<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.emfcamp.org/2014/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jonty</id>
	<title>Electromagnetic Field - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.emfcamp.org/2014/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jonty"/>
	<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/wiki/Special:Contributions/Jonty"/>
	<updated>2026-04-21T13:36:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3811</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3811"/>
		<updated>2014-11-28T20:15:27Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
The badge is Arudino Due compatible, so [http://arduino.cc/en/Guide/ArduinoDue some of their instructions may help you if you have problems].&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
To make the badge Arduino shield compatible, follow [https://wiki.emfcamp.org/wiki/TiLDA_MKe#Making_the_badge_Arduino_shield_compatible these instructions].&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Using the badge hardware=&lt;br /&gt;
The badge has a plethora of hardware built in for you to play with, everything from accelerometers and gyroscopes to hidden ethernet headers! Breaking it all down is too much detail for this document, however we'll call out some things we built in that you might want to play with.&lt;br /&gt;
&lt;br /&gt;
Remember the badge is Arduino Due compatible, and we broke out nearly all the features of the ARM chip so you can access them. [http://arduino.cc/en/Main/ArduinoBoardDue Anything the Due can do], the TiLDA can do!&lt;br /&gt;
&lt;br /&gt;
==Making the badge Arduino shield compatible==&lt;br /&gt;
To make the badge Arduino shield compatible you'll need to solder simple strips of header pins (FIXME: Link to part) onto the back of the badge. This diagram (FIXME: DIAGRAM, LINK IT!) shows the placement.&lt;br /&gt;
&lt;br /&gt;
==Interesting things to play with==&lt;br /&gt;
Most of the interesting things are on the back of the badge. They're clearly marked in white. [https://wiki.emfcamp.org/w/images/b/bd/Badge_Back.png This diagram of the back] should allow you to locate them.&lt;br /&gt;
&lt;br /&gt;
* Full Arduino shield compatible pins (Requires soldering the headers on the back of the badge)&lt;br /&gt;
* Pins either side of the lanyard holes for conductive thread (D19, D18, GND, 3V3)&lt;br /&gt;
* Infrared transmitter on the front (FIXME: Part number etc)&lt;br /&gt;
* Piezo buzzer (FIXME: Pins and details)&lt;br /&gt;
* On-board ethernet (not available on the Due) - requires breakout module (FIXME: Which one?)&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
* 128x64 pixel backlit LCD display (FIXME: Part number &amp;amp; spec sheet?)&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
* [http://shop.ciseco.co.uk/powerpod-1117-3v3/ PowerPOD] interface (FIXME: What does this do again?)&lt;br /&gt;
* MicroSD adapter breakout (FIXME: Which component)&lt;br /&gt;
* Compass (magnetometer) breakout (FIXME: Which component)&lt;br /&gt;
* Reprogramming headers for the 868Mhz [http://www.ti.com/product/cc1110f32 CC1110 radio module]&lt;br /&gt;
* 1 megabit flash module (FIXME: Part number etc)&lt;br /&gt;
* SPI breakout&lt;br /&gt;
* 2x RGB LEDs on the front&lt;br /&gt;
&lt;br /&gt;
FIXME: Anything else I missed? FTDI?&lt;br /&gt;
&lt;br /&gt;
==Included hardware==&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
=Useful Hacks!=&lt;br /&gt;
==3d printable &amp;amp; laser-cuttable badge case==&lt;br /&gt;
Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
==Convert images to TiLDA bitmap format==&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a fully working Piezo on board!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3810</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3810"/>
		<updated>2014-11-28T20:14:17Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Hacking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
The badge is Arudino Due compatible, so [http://arduino.cc/en/Guide/ArduinoDue some of their instructions may help you if you have problems].&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
To make the badge Arduino shield compatible, follow [https://wiki.emfcamp.org/wiki/TiLDA_MKe#Making_the_badge_Arduino_shield_compatible these instructions].&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Using the badge hardware=&lt;br /&gt;
The badge has a plethora of hardware built in for you to play with, everything from accelerometers and gyroscopes to hidden ethernet headers! Breaking it all down is too much detail for this document, however we'll call out some things we built in that you might want to play with.&lt;br /&gt;
&lt;br /&gt;
Remember the badge is Arduino Due compatible, and we broke out nearly all the features of the ARM chip so you can access them. [http://arduino.cc/en/Main/ArduinoBoardDue Anything the Due can do], the TiLDA can do!&lt;br /&gt;
&lt;br /&gt;
==Making the badge Arduino shield compatible==&lt;br /&gt;
To make the badge Arduino shield compatible you'll need to solder simple strips of header pins (FIXME: Link to part) onto the back of the badge. This diagram (FIXME: DIAGRAM, LINK IT!) shows the placement.&lt;br /&gt;
&lt;br /&gt;
==Interesting things to play with==&lt;br /&gt;
Most of the interesting things are on the back of the badge. They're clearly marked in white. [https://wiki.emfcamp.org/w/images/b/bd/Badge_Back.png This diagram of the back] should allow you to locate them.&lt;br /&gt;
&lt;br /&gt;
* Full Arduino shield compatible pins (Requires soldering the headers on the back of the badge)&lt;br /&gt;
* Pins either side of the lanyard holes for conductive thread (D19, D18, GND, 3V3)&lt;br /&gt;
* Infrared transmitter on the front (FIXME: Part number etc)&lt;br /&gt;
* Piezo buzzer (FIXME: Pins and details)&lt;br /&gt;
* On-board ethernet (not available on the Due) - requires breakout module (FIXME: Which one?)&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
* 128x64 pixel backlit LCD display (FIXME: Part number &amp;amp; spec sheet?)&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
* [http://shop.ciseco.co.uk/powerpod-1117-3v3/ PowerPOD] interface (FIXME: What does this do again?)&lt;br /&gt;
* MicroSD adapter breakout (FIXME: Which component)&lt;br /&gt;
* Compass (magnetometer) breakout (FIXME: Which component)&lt;br /&gt;
* Reprogramming headers for the 868Mhz [http://www.ti.com/product/cc1110f32 CC1110 radio module]&lt;br /&gt;
* 1 megabit flash module (FIXME: Part number etc)&lt;br /&gt;
* SPI breakout&lt;br /&gt;
* 2x RGB LEDs on the front&lt;br /&gt;
&lt;br /&gt;
FIXME: Anything else I missed? FTDI?&lt;br /&gt;
&lt;br /&gt;
==Included hardware==&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a fully working Piezo on board!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacks!=&lt;br /&gt;
==3d printable &amp;amp; laser-cuttable badge case==&lt;br /&gt;
Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
==Convert images to TiLDA bitmap format==&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3809</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3809"/>
		<updated>2014-11-28T19:59:02Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Sound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
The badge is Arudino Due compatible, so [http://arduino.cc/en/Guide/ArduinoDue some of their instructions may help you if you have problems].&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
To make the badge Arduino shield compatible, follow [https://wiki.emfcamp.org/wiki/TiLDA_MKe#Making_the_badge_Arduino_shield_compatible these instructions].&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Using the badge hardware=&lt;br /&gt;
The badge has a plethora of hardware built in for you to play with, everything from accelerometers and gyroscopes to hidden ethernet headers! Breaking it all down is too much detail for this document, however we'll call out some things we built in that you might want to play with.&lt;br /&gt;
&lt;br /&gt;
Remember the badge is Arduino Due compatible, and we broke out nearly all the features of the ARM chip so you can access them. [http://arduino.cc/en/Main/ArduinoBoardDue Anything the Due can do], the TiLDA can do!&lt;br /&gt;
&lt;br /&gt;
==Making the badge Arduino shield compatible==&lt;br /&gt;
To make the badge Arduino shield compatible you'll need to solder simple strips of header pins (FIXME: Link to part) onto the back of the badge. This diagram (FIXME: DIAGRAM, LINK IT!) shows the placement.&lt;br /&gt;
&lt;br /&gt;
==Interesting things to play with==&lt;br /&gt;
Most of the interesting things are on the back of the badge. They're clearly marked in white. [https://wiki.emfcamp.org/w/images/b/bd/Badge_Back.png This diagram of the back] should allow you to locate them.&lt;br /&gt;
&lt;br /&gt;
* Full Arduino shield compatible pins (Requires soldering the headers on the back of the badge)&lt;br /&gt;
* Pins either side of the lanyard holes for conductive thread (D19, D18, GND, 3V3)&lt;br /&gt;
* Infrared transmitter on the front (FIXME: Part number etc)&lt;br /&gt;
* Piezo buzzer (FIXME: Pins and details)&lt;br /&gt;
* On-board ethernet (not available on the Due) - requires breakout module (FIXME: Which one?)&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
* 128x64 pixel backlit LCD display (FIXME: Part number &amp;amp; spec sheet?)&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
* [http://shop.ciseco.co.uk/powerpod-1117-3v3/ PowerPOD] interface (FIXME: What does this do again?)&lt;br /&gt;
* MicroSD adapter breakout (FIXME: Which component)&lt;br /&gt;
* Compass (magnetometer) breakout (FIXME: Which component)&lt;br /&gt;
* Reprogramming headers for the 868Mhz [http://www.ti.com/product/cc1110f32 CC1110 radio module]&lt;br /&gt;
* 1 megabit flash module (FIXME: Part number etc)&lt;br /&gt;
* SPI breakout&lt;br /&gt;
* 2x RGB LEDs on the front&lt;br /&gt;
&lt;br /&gt;
FIXME: Anything else I missed? FTDI?&lt;br /&gt;
&lt;br /&gt;
==Included hardware==&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a fully working Piezo on board!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3808</id>
		<title>TiLDA MKe Competition</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3808"/>
		<updated>2014-11-28T19:58:24Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Now that EMF is over and you've returned home, its time to dig out your EMF badge and start playing!&lt;br /&gt;
&lt;br /&gt;
We'll be rewarding the best hack using the badge with '''two tickets to EMF 2016''', and '''two tickets to the one-day event in 2015'''. We'll also have '''other prizes available''' for hacks in different categories!&lt;br /&gt;
&lt;br /&gt;
==Submitting your hack==&lt;br /&gt;
Email [mailto:competition@emfcamp.org competition@emfcamp.org] with the details of your hack, either linking to an existing website or attaching documentation to the email.&lt;br /&gt;
&lt;br /&gt;
'''Submissions close on the 31st March 2015 at midnight''', with the '''winners being announced on April 15th'''.&lt;br /&gt;
&lt;br /&gt;
==Judging==&lt;br /&gt;
The entries will be judged by the same team that designed and built the badges. They'll be looking for cool software that other badge owners can use, unexpected uses of the hardware, and generally delightful hacks. Don't be scared if this is new to you, the judges will take experience into account!&lt;br /&gt;
&lt;br /&gt;
We'll also have '''prizes for the runners up''', and for people who are new to hacking.&lt;br /&gt;
&lt;br /&gt;
==Wait, how do I modify and use the badge?==&lt;br /&gt;
We've got comprehensive documentation over on the [https://wiki.emfcamp.org/wiki/TiLDA_MKe badge page].&lt;br /&gt;
&lt;br /&gt;
==My badge is broken so I can't enter!==&lt;br /&gt;
If your badge was one of the few that suffered a hardware failure, [mailto:badge@emfcamp.org get in touch] and we'll be happy to replace it so you can take part in the competition.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3807</id>
		<title>TiLDA MKe Competition</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3807"/>
		<updated>2014-11-28T19:57:16Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Now that EMF is over and you've returned home, its time to dig out your EMF badge and start playing!&lt;br /&gt;
&lt;br /&gt;
We'll be rewarding the best hack using the badge with '''two tickets to EMF 2016''', and '''two tickets to the one-day event in 2015'''. We might also have '''other prizes available''' for hacks in different categories!&lt;br /&gt;
&lt;br /&gt;
==Submitting your hack==&lt;br /&gt;
Email [mailto:competition@emfcamp.org competition@emfcamp.org] with the details of your hack, either linking to an existing website or attaching documentation to the email.&lt;br /&gt;
&lt;br /&gt;
'''Submissions close on the 31st March 2015 at midnight''', with the winners being announced on April 15th.&lt;br /&gt;
&lt;br /&gt;
==Judging==&lt;br /&gt;
The entries will be judged by the same team that designed and built the badges. They'll be looking for cool software that other badge owners can use, unexpected uses of the hardware, and generally delightful hacks. Don't be scared if this is new to you, the judges will take experience into account!&lt;br /&gt;
&lt;br /&gt;
We'll also have prizes for the runners up, and for people who are new to hacking.&lt;br /&gt;
&lt;br /&gt;
==Wait, how do I modify and use the badge?==&lt;br /&gt;
We've got comprehensive documentation over on the [https://wiki.emfcamp.org/wiki/TiLDA_MKe badge page].&lt;br /&gt;
&lt;br /&gt;
==My badge is broken so I can't enter!==&lt;br /&gt;
If your badge was one of the few that suffered a hardware failure, [mailto:badge@emfcamp.org get in touch] and we'll be happy to replace it so you can take part in the competition.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3806</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3806"/>
		<updated>2014-11-28T19:36:06Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Programming the badge as an Arduino */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
The badge is Arudino Due compatible, so [http://arduino.cc/en/Guide/ArduinoDue some of their instructions may help you if you have problems].&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
To make the badge Arduino shield compatible, follow [https://wiki.emfcamp.org/wiki/TiLDA_MKe#Making_the_badge_Arduino_shield_compatible these instructions].&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Using the badge hardware=&lt;br /&gt;
The badge has a plethora of hardware built in for you to play with, everything from accelerometers and gyroscopes to hidden ethernet headers! Breaking it all down is too much detail for this document, however we'll call out some things we built in that you might want to play with.&lt;br /&gt;
&lt;br /&gt;
Remember the badge is Arduino Due compatible, and we broke out nearly all the features of the ARM chip so you can access them. [http://arduino.cc/en/Main/ArduinoBoardDue Anything the Due can do], the TiLDA can do!&lt;br /&gt;
&lt;br /&gt;
==Making the badge Arduino shield compatible==&lt;br /&gt;
To make the badge Arduino shield compatible you'll need to solder simple strips of header pins (FIXME: Link to part) onto the back of the badge. This diagram (FIXME: DIAGRAM, LINK IT!) shows the placement.&lt;br /&gt;
&lt;br /&gt;
==Interesting things to play with==&lt;br /&gt;
Most of the interesting things are on the back of the badge. They're clearly marked in white. [https://wiki.emfcamp.org/w/images/b/bd/Badge_Back.png This diagram of the back] should allow you to locate them.&lt;br /&gt;
&lt;br /&gt;
* Full Arduino shield compatible pins (Requires soldering the headers on the back of the badge)&lt;br /&gt;
* Pins either side of the lanyard holes for conductive thread (D19, D18, GND, 3V3)&lt;br /&gt;
* Infrared transmitter on the front (FIXME: Part number etc)&lt;br /&gt;
* Piezo buzzer (FIXME: Pins and details)&lt;br /&gt;
* On-board ethernet (not available on the Due) - requires breakout module (FIXME: Which one?)&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
* 128x64 pixel backlit LCD display (FIXME: Part number &amp;amp; spec sheet?)&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
* [http://shop.ciseco.co.uk/powerpod-1117-3v3/ PowerPOD] interface (FIXME: What does this do again?)&lt;br /&gt;
* MicroSD adapter breakout (FIXME: Which component)&lt;br /&gt;
* Compass (magnetometer) breakout (FIXME: Which component)&lt;br /&gt;
* Reprogramming headers for the 868Mhz [http://www.ti.com/product/cc1110f32 CC1110 radio module]&lt;br /&gt;
* 1 megabit flash module (FIXME: Part number etc)&lt;br /&gt;
* SPI breakout&lt;br /&gt;
* 2x RGB LEDs on the front&lt;br /&gt;
&lt;br /&gt;
FIXME: Anything else I missed? FTDI?&lt;br /&gt;
&lt;br /&gt;
==Included hardware==&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3805</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3805"/>
		<updated>2014-11-28T19:35:12Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Using the badge hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
The badge is Arudino Due compatible, so [http://arduino.cc/en/Guide/ArduinoDue some of their instructions may help you if you have problems].&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Using the badge hardware=&lt;br /&gt;
The badge has a plethora of hardware built in for you to play with, everything from accelerometers and gyroscopes to hidden ethernet headers! Breaking it all down is too much detail for this document, however we'll call out some things we built in that you might want to play with.&lt;br /&gt;
&lt;br /&gt;
Remember the badge is Arduino Due compatible, and we broke out nearly all the features of the ARM chip so you can access them. [http://arduino.cc/en/Main/ArduinoBoardDue Anything the Due can do], the TiLDA can do!&lt;br /&gt;
&lt;br /&gt;
==Making the badge Arduino shield compatible==&lt;br /&gt;
To make the badge Arduino shield compatible you'll need to solder simple strips of header pins (FIXME: Link to part) onto the back of the badge. This diagram (FIXME: DIAGRAM, LINK IT!) shows the placement.&lt;br /&gt;
&lt;br /&gt;
==Interesting things to play with==&lt;br /&gt;
Most of the interesting things are on the back of the badge. They're clearly marked in white. [https://wiki.emfcamp.org/w/images/b/bd/Badge_Back.png This diagram of the back] should allow you to locate them.&lt;br /&gt;
&lt;br /&gt;
* Full Arduino shield compatible pins (Requires soldering the headers on the back of the badge)&lt;br /&gt;
* Pins either side of the lanyard holes for conductive thread (D19, D18, GND, 3V3)&lt;br /&gt;
* Infrared transmitter on the front (FIXME: Part number etc)&lt;br /&gt;
* Piezo buzzer (FIXME: Pins and details)&lt;br /&gt;
* On-board ethernet (not available on the Due) - requires breakout module (FIXME: Which one?)&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
* 128x64 pixel backlit LCD display (FIXME: Part number &amp;amp; spec sheet?)&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
* [http://shop.ciseco.co.uk/powerpod-1117-3v3/ PowerPOD] interface (FIXME: What does this do again?)&lt;br /&gt;
* MicroSD adapter breakout (FIXME: Which component)&lt;br /&gt;
* Compass (magnetometer) breakout (FIXME: Which component)&lt;br /&gt;
* Reprogramming headers for the 868Mhz [http://www.ti.com/product/cc1110f32 CC1110 radio module]&lt;br /&gt;
* 1 megabit flash module (FIXME: Part number etc)&lt;br /&gt;
* SPI breakout&lt;br /&gt;
* 2x RGB LEDs on the front&lt;br /&gt;
&lt;br /&gt;
FIXME: Anything else I missed? FTDI?&lt;br /&gt;
&lt;br /&gt;
==Included hardware==&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3804</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3804"/>
		<updated>2014-11-28T19:33:09Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Using the badge hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
The badge is Arudino Due compatible, so [http://arduino.cc/en/Guide/ArduinoDue some of their instructions may help you if you have problems].&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Using the badge hardware=&lt;br /&gt;
To make the badge Arduino shield compatible you'll need to solder simple strips of header pins (FIXME: Link to part) onto the back of the badge. This diagram (FIXME: DIAGRAM, LINK IT!) shows the placement.&lt;br /&gt;
&lt;br /&gt;
The badge has a plethora of hardware built in for you to play with, everything from accelerometers and gyroscopes to hidden ethernet headers! Breaking it all down is too much detail for this document, however we'll call out some things we built in that you might want to play with.&lt;br /&gt;
&lt;br /&gt;
Remember the badge is Arduino Due compatible, and we broke out nearly all the features of the ARM chip so you can access them. [http://arduino.cc/en/Main/ArduinoBoardDue Anything the Due can do], the TiLDA can do!&lt;br /&gt;
&lt;br /&gt;
==Interesting things to play with==&lt;br /&gt;
Most of the interesting things are on the back of the badge. They're clearly marked in white. [https://wiki.emfcamp.org/w/images/b/bd/Badge_Back.png This diagram of the back] should allow you to locate them.&lt;br /&gt;
&lt;br /&gt;
* Full Arduino shield compatible pins (Requires soldering the headers on the back of the badge)&lt;br /&gt;
* Pins either side of the lanyard holes for conductive thread (D19, D18, GND, 3V3)&lt;br /&gt;
* Infrared transmitter on the front (FIXME: Part number etc)&lt;br /&gt;
* Piezo buzzer (FIXME: Pins and details)&lt;br /&gt;
* On-board ethernet (not available on the Due) - requires breakout module (FIXME: Which one?)&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
* 128x64 pixel backlit LCD display (FIXME: Part number &amp;amp; spec sheet?)&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
* [http://shop.ciseco.co.uk/powerpod-1117-3v3/ PowerPOD] interface (FIXME: What does this do again?)&lt;br /&gt;
* MicroSD adapter breakout (FIXME: Which component)&lt;br /&gt;
* Compass (magnetometer) breakout (FIXME: Which component)&lt;br /&gt;
* Reprogramming headers for the 868Mhz [http://www.ti.com/product/cc1110f32 CC1110 radio module]&lt;br /&gt;
* 1 megabit flash module (FIXME: Part number etc)&lt;br /&gt;
* SPI breakout&lt;br /&gt;
* 2x RGB LEDs on the front&lt;br /&gt;
&lt;br /&gt;
FIXME: Anything else I missed? FTDI?&lt;br /&gt;
&lt;br /&gt;
==Included hardware==&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3803</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3803"/>
		<updated>2014-11-28T19:13:57Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
The badge is Arudino Due compatible, so [http://arduino.cc/en/Guide/ArduinoDue some of their instructions may help you if you have problems].&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Using the badge hardware=&lt;br /&gt;
The badge has a plethora of hardware built in for you to play with, everything from accelerometers and gyroscopes to hidden ethernet headers! Breaking it all down is too much detail for this document, however we'll call out some things we built in that you might want to play with.&lt;br /&gt;
&lt;br /&gt;
Remember the badge is Arduino Due compatible, and we broke out nearly all the features of the ARM chip so you can access them. [http://arduino.cc/en/Main/ArduinoBoardDue Anything the Due can do], the TiLDA can do!&lt;br /&gt;
&lt;br /&gt;
==Interesting things to play with==&lt;br /&gt;
Most of the interesting things are on the back of the badge. They're clearly marked in white. [https://wiki.emfcamp.org/w/images/b/bd/Badge_Back.png This diagram of the back] should allow you to locate them.&lt;br /&gt;
&lt;br /&gt;
* Full Arduino shield compatible pins (Requires soldering the headers on the back of the badge)&lt;br /&gt;
* Pins either side of the lanyard holes for conductive thread (D19, D18, GND, 3V3)&lt;br /&gt;
* Infrared transmitter on the front (FIXME: Part number etc)&lt;br /&gt;
* Piezo buzzer (FIXME: Pins and details)&lt;br /&gt;
* On-board ethernet (not available on the Due) - requires breakout module (FIXME: Which one?)&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
* 128x64 pixel backlit LCD display (FIXME: Part number &amp;amp; spec sheet?)&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
* [http://shop.ciseco.co.uk/powerpod-1117-3v3/ PowerPOD] interface (FIXME: What does this do again?)&lt;br /&gt;
* MicroSD adapter breakout (FIXME: Which component)&lt;br /&gt;
* Compass (magnetometer) breakout (FIXME: Which component)&lt;br /&gt;
* Reprogramming headers for the 868Mhz [http://www.ti.com/product/cc1110f32 CC1110 radio module]&lt;br /&gt;
* 1 megabit flash module (FIXME: Part number etc)&lt;br /&gt;
* SPI breakout&lt;br /&gt;
* 2x RGB LEDs on the front&lt;br /&gt;
&lt;br /&gt;
FIXME: Anything else I missed? FTDI?&lt;br /&gt;
&lt;br /&gt;
==Included hardware==&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3802</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3802"/>
		<updated>2014-11-28T18:36:42Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
==Getting help==&lt;br /&gt;
The EMF 2014 badge is a complex piece of hardware and software, however remember that you can just treat it as an Arduino if you find it all too daunting.&lt;br /&gt;
&lt;br /&gt;
If you get stuck and need advice, there's an [http://webchat.freenode.net/?channels=tilda active IRC chatroom] you can join to ask for advice, or if you're really stuck you can email us on [mailto:badge@emfcamp.org badge@emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3801</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3801"/>
		<updated>2014-11-28T18:29:11Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic post-event features==&lt;br /&gt;
We made sure that the badge has a few features to play with once the event is over. More will be added over time as attendees submit changes to us.&lt;br /&gt;
&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
But of course the point of the badge is to modify it and use it for other interesting things! The following sections describe how to update the firmware on the badge, how to use it as a simple arduino, and how to write your own code for the main badge firmware.&lt;br /&gt;
&lt;br /&gt;
=How to update the badge software &amp;amp; program the badge=&lt;br /&gt;
The badge software has been substantially updated since EMF, fixing bugs and removing features that will no longer work now you're away from our radio network. You should update your badge before starting to play with it any further. If you've never used an Arduino before this might be tricky - ask an Arduino-literate friend to help you, or drop by your nearest [http://hackspace.org.uk hackspace] and ask for advice.&lt;br /&gt;
&lt;br /&gt;
==Set up your environment==&lt;br /&gt;
* Plug your badge into your computer via a MicroUSB cable. Make sure the power switch on the back is set to &amp;quot;USB&amp;quot;.&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* Download the TiLDA firmware code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE.&lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned or downloaded. To do this use File -&amp;gt; Preferences -&amp;gt; “Set Sketchbook location”. On MacOS, this is Arduino -&amp;gt; Preferences. &lt;br /&gt;
* Restart the Arduino IDE.&lt;br /&gt;
* Open sketch “EMF2014”.&lt;br /&gt;
* Set Tools -&amp;gt; Board to MKe v0.333 (RTOS Core).&lt;br /&gt;
* Set Tools -&amp;gt; Port to correct port for the Arduino&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Your badge should now be running the latest TiLDA firmware!&lt;br /&gt;
&lt;br /&gt;
==Programming the badge as an Arduino==&lt;br /&gt;
The badge is completely Arduino Due compatible, simply upload normal Arduino code and the badge will function. However if you want to use any of the more complex hardware on the badge (such as the screen and radio) we recommend programming it using our FreeRTOS framework documented below.&lt;br /&gt;
&lt;br /&gt;
If you do program the badge with simple Arduino code but wish to switch back to our official firmware, simply change the sketch to &amp;quot;EMF2014&amp;quot; and upload again.&lt;br /&gt;
&lt;br /&gt;
==Programming the badge in FreeRTOS==&lt;br /&gt;
===Your first “Hello world” app===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
===Why are things so different from standard Arduino code?===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spent quite a lot of time to make the built-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
==Debugging and Gotchas==&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
==Your own wireless badge network==&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
==Contribute==&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3800</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3800"/>
		<updated>2014-11-28T18:06:49Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=EMF 2014 Badge= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards. We designed an Arduino compatible platform to allow easy reuse and access, and have published all code and design files.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic features and functions==&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
== How to get going ==&lt;br /&gt;
=== Set up your environment ===&lt;br /&gt;
* Plug your badge into your computer via USB&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* “git clone” or download TiLDA source code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE. &lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned. To do this use File | Preferences | “Set Sketchbook location”. On MacOS, this is Arduino | Preferences &lt;br /&gt;
* Restart the Arduino IDE&lt;br /&gt;
* Open sketch “EMF2014”&lt;br /&gt;
* Set Tools | Board to MKe v0.333 (RTOS Core)&lt;br /&gt;
* Set Tools | Port to correct port (you might have to research this - some operating systems like Windows require you to install drivers or become a member of a certain group)&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Woohoo - You just successfully uploaded code to your badge&lt;br /&gt;
&lt;br /&gt;
=== Your first “Hello world” app ===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
=== Why are things so different from standard Arduino code? ===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spend quite a lot of time to make the build-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== How to use the badge with pure Arduino code ===&lt;br /&gt;
If you prefer you can always start from scratch without FreeRTOS or any of our code, just keep in mind that you won’t be able to receive messages via radio or use any of the API features we already added. Just start a new sketch in the Arduino IDE for that and get going. If you want to load the main firmware again just change the sketch to “EMF2014” and upload again.&lt;br /&gt;
&lt;br /&gt;
=== Debugging and Gotchas ===&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
=== Radio infrastructure ===&lt;br /&gt;
The radio infrastructure is distributed between DKs. Every “gateway” has a Raspberry Pi with two Ciseco USB radios. We never had the chance to actually try it with a large number of badges in the same spot, so please don’t expect it to work perfectly.&lt;br /&gt;
&lt;br /&gt;
=== Your own wireless badge network ===&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
=== Contribute ===&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3799</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3799"/>
		<updated>2014-11-28T18:04:48Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
=Aim= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards, we designed an Arduino compatible platform to allow easy reuse and access. As with the previous badge all code and design files are available.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
Due to the aforementioned supplier issues it is possible that you may have received a faulty badge, or it may have been damaged by connecting the battery backwards. If you badge will not turn on when it has been plugged in with a MicroUSB cable (and the power switch on the back is set to &amp;quot;USB&amp;quot;), or something else seems wrong with it, please email [mailto:badge@emfcamp.org badge@emfcamp.org] and we'll try to fix or replace your badge.&lt;br /&gt;
&lt;br /&gt;
==Basic features and functions==&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
== How to get going ==&lt;br /&gt;
=== Set up your environment ===&lt;br /&gt;
* Plug your badge into your computer via USB&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* “git clone” or download TiLDA source code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE. &lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned. To do this use File | Preferences | “Set Sketchbook location”. On MacOS, this is Arduino | Preferences &lt;br /&gt;
* Restart the Arduino IDE&lt;br /&gt;
* Open sketch “EMF2014”&lt;br /&gt;
* Set Tools | Board to MKe v0.333 (RTOS Core)&lt;br /&gt;
* Set Tools | Port to correct port (you might have to research this - some operating systems like Windows require you to install drivers or become a member of a certain group)&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Woohoo - You just successfully uploaded code to your badge&lt;br /&gt;
&lt;br /&gt;
=== Your first “Hello world” app ===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
=== Why are things so different from standard Arduino code? ===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spend quite a lot of time to make the build-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== How to use the badge with pure Arduino code ===&lt;br /&gt;
If you prefer you can always start from scratch without FreeRTOS or any of our code, just keep in mind that you won’t be able to receive messages via radio or use any of the API features we already added. Just start a new sketch in the Arduino IDE for that and get going. If you want to load the main firmware again just change the sketch to “EMF2014” and upload again.&lt;br /&gt;
&lt;br /&gt;
=== Debugging and Gotchas ===&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
=== Radio infrastructure ===&lt;br /&gt;
The radio infrastructure is distributed between DKs. Every “gateway” has a Raspberry Pi with two Ciseco USB radios. We never had the chance to actually try it with a large number of badges in the same spot, so please don’t expect it to work perfectly.&lt;br /&gt;
&lt;br /&gt;
=== Your own wireless badge network ===&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
=== Contribute ===&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3798</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3798"/>
		<updated>2014-11-28T17:58:31Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TiLDA MKe project, Code name &amp;quot;ElectroMagnetic Boogaloo&amp;quot;, is being headed by [[User:Dpslwk|'RepRap' Matt]] and [[User:thinkl33t|Bob]]&lt;br /&gt;
[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
Please Note: There are a couple of minor hardware and some firmware issues that might be affecting your badge. If you've let the magic smoke out of your charge controller or have tried to re-flash and ended up with nothing but a couple of dimly glowing lights then DO NOT DESPAIR -It's recoverable and fixes, documentation and lots of firmware are still being produced :)&lt;br /&gt;
&lt;br /&gt;
=Aim= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards, we designed an Arduino compatible platform to allow easy reuse and access. As with the previous badge all code and design files are available.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
A very last minute battery (and connector) change on the badge due to a supplier problem meant two issues arose with the badge during EMF:&lt;br /&gt;
&lt;br /&gt;
* '''Always make sure to plug your battery in the right way round!''' The new battery connector allows you to connect it backwards. We did our best to mitigate this, but connecting it incorrectly will destroy the power management controller and prevent the badge from charging or running from the battery. It will still function perfectly using USB power. &amp;quot;Red&amp;quot; and &amp;quot;Black&amp;quot; are written next to the connector - please make sure to plug it in correctly.&lt;br /&gt;
&lt;br /&gt;
* '''Be careful not to short the battery connector wires!''' The new battery connector slightly exposes the wires when the battery is plugged in. If a metal object shorts the two wires, it can result in extreme battery damage. If we'd known this was such an issue before the event we would have applied protective material to it - we suggest covering the exposed connector in tape, sugru, blu-tack, or some other insulating material. Alternatively, simply unplug the battery when your badge is not in use!&lt;br /&gt;
&lt;br /&gt;
==Basic features and functions==&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
== How to get going ==&lt;br /&gt;
=== Set up your environment ===&lt;br /&gt;
* Plug your badge into your computer via USB&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* “git clone” or download TiLDA source code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE. &lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned. To do this use File | Preferences | “Set Sketchbook location”. On MacOS, this is Arduino | Preferences &lt;br /&gt;
* Restart the Arduino IDE&lt;br /&gt;
* Open sketch “EMF2014”&lt;br /&gt;
* Set Tools | Board to MKe v0.333 (RTOS Core)&lt;br /&gt;
* Set Tools | Port to correct port (you might have to research this - some operating systems like Windows require you to install drivers or become a member of a certain group)&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Woohoo - You just successfully uploaded code to your badge&lt;br /&gt;
&lt;br /&gt;
=== Your first “Hello world” app ===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
=== Why are things so different from standard Arduino code? ===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spend quite a lot of time to make the build-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== How to use the badge with pure Arduino code ===&lt;br /&gt;
If you prefer you can always start from scratch without FreeRTOS or any of our code, just keep in mind that you won’t be able to receive messages via radio or use any of the API features we already added. Just start a new sketch in the Arduino IDE for that and get going. If you want to load the main firmware again just change the sketch to “EMF2014” and upload again.&lt;br /&gt;
&lt;br /&gt;
=== Debugging and Gotchas ===&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
=== Radio infrastructure ===&lt;br /&gt;
The radio infrastructure is distributed between DKs. Every “gateway” has a Raspberry Pi with two Ciseco USB radios. We never had the chance to actually try it with a large number of badges in the same spot, so please don’t expect it to work perfectly.&lt;br /&gt;
&lt;br /&gt;
=== Your own wireless badge network ===&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
=== Contribute ===&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3797</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3797"/>
		<updated>2014-11-28T17:28:52Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TiLDA MKe project, Code name &amp;quot;ElectroMagnetic Boogaloo&amp;quot;, is being headed by [[User:Dpslwk|'RepRap' Matt]] and [[User:thinkl33t|Bob]]&lt;br /&gt;
[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
Please Note: There are a couple of minor hardware and some firmware issues that might be affecting your badge. If you've let the magic smoke out of your charge controller or have tried to re-flash and ended up with nothing but a couple of dimly glowing lights then DO NOT DESPAIR -It's recoverable and fixes, documentation and lots of firmware are still being produced :)&lt;br /&gt;
&lt;br /&gt;
=Aim= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees an interesting bit of hardware to play with during the camp and experiment with afterwards, we designed an Arduino compatible platform to allow easy reuse and access. As with the previous badge all code and design files are available.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
'''Always make sure you plug your battery in the right way round!'''  If you don't, the charge controller will let out its magic smoke and die / become damaged and die later.  The badge itself will still work, but it wont have the ability to charge anymore.  &lt;br /&gt;
&lt;br /&gt;
We think this is the cause of the charge controller issues a small number of badges had at the event was due to this mistake being made during final assembly on-site. &lt;br /&gt;
&lt;br /&gt;
'''Lithium Batteries are dangerous!'''  While these batteries are better protected than the MK1 batteries, they are still scary.  Do not short your battery, and if it starts bulging or gets punctured, '''DO NOT USE IT AGAIN''' and dispose of it properly.&lt;br /&gt;
&lt;br /&gt;
==Basic features and functions==&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
== How to get going ==&lt;br /&gt;
=== Set up your environment ===&lt;br /&gt;
* Plug your badge into your computer via USB&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* “git clone” or download TiLDA source code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE. &lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned. To do this use File | Preferences | “Set Sketchbook location”. On MacOS, this is Arduino | Preferences &lt;br /&gt;
* Restart the Arduino IDE&lt;br /&gt;
* Open sketch “EMF2014”&lt;br /&gt;
* Set Tools | Board to MKe v0.333 (RTOS Core)&lt;br /&gt;
* Set Tools | Port to correct port (you might have to research this - some operating systems like Windows require you to install drivers or become a member of a certain group)&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Woohoo - You just successfully uploaded code to your badge&lt;br /&gt;
&lt;br /&gt;
=== Your first “Hello world” app ===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
=== Why are things so different from standard Arduino code? ===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spend quite a lot of time to make the build-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== How to use the badge with pure Arduino code ===&lt;br /&gt;
If you prefer you can always start from scratch without FreeRTOS or any of our code, just keep in mind that you won’t be able to receive messages via radio or use any of the API features we already added. Just start a new sketch in the Arduino IDE for that and get going. If you want to load the main firmware again just change the sketch to “EMF2014” and upload again.&lt;br /&gt;
&lt;br /&gt;
=== Debugging and Gotchas ===&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
=== Radio infrastructure ===&lt;br /&gt;
The radio infrastructure is distributed between DKs. Every “gateway” has a Raspberry Pi with two Ciseco USB radios. We never had the chance to actually try it with a large number of badges in the same spot, so please don’t expect it to work perfectly.&lt;br /&gt;
&lt;br /&gt;
=== Your own wireless badge network ===&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
=== Contribute ===&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3796</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3796"/>
		<updated>2014-11-28T17:10:58Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TiLDA MKe project, Code name &amp;quot;ElectroMagnetic Boogaloo&amp;quot;, is being headed by [[User:Dpslwk|'RepRap' Matt]] and [[User:thinkl33t|Bob]]&lt;br /&gt;
[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
Please Note: There are a couple of minor hardware and some firmware issues that might be affecting your badge. If you've let the magic smoke out of your charge controller or have tried to re-flash and ended up with nothing but a couple of dimly glowing lights then DO NOT DESPAIR -It's recoverable and fixes, documentation and lots of firmware are still being produced :)&lt;br /&gt;
&lt;br /&gt;
=Aim= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees live schedule updates and notifications. As with the original TiLDA we wanted to keep with an Arduino compatible platform that will allow badge hacking during and after the camp. As with the previous badge all code and design files are available.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
'''Always make sure you plug your battery in the right way round!'''  If you don't, the charge controller will let out its magic smoke and die / become damaged and die later.  The badge itself will still work, but it wont have the ability to charge anymore.  &lt;br /&gt;
&lt;br /&gt;
We think this is the cause of the charge controller issues a small number of badges had at the event was due to this mistake being made during final assembly on-site. &lt;br /&gt;
&lt;br /&gt;
'''Lithium Batteries are dangerous!'''  While these batteries are better protected than the MK1 batteries, they are still scary.  Do not short your battery, and if it starts bulging or gets punctured, '''DO NOT USE IT AGAIN''' and dispose of it properly.&lt;br /&gt;
&lt;br /&gt;
==Basic features and functions==&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
== How to get going ==&lt;br /&gt;
=== Set up your environment ===&lt;br /&gt;
* Plug your badge into your computer via USB&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* “git clone” or download TiLDA source code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE. &lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned. To do this use File | Preferences | “Set Sketchbook location”. On MacOS, this is Arduino | Preferences &lt;br /&gt;
* Restart the Arduino IDE&lt;br /&gt;
* Open sketch “EMF2014”&lt;br /&gt;
* Set Tools | Board to MKe v0.333 (RTOS Core)&lt;br /&gt;
* Set Tools | Port to correct port (you might have to research this - some operating systems like Windows require you to install drivers or become a member of a certain group)&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Woohoo - You just successfully uploaded code to your badge&lt;br /&gt;
&lt;br /&gt;
=== Your first “Hello world” app ===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
=== Why are things so different from standard Arduino code? ===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spend quite a lot of time to make the build-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
&lt;br /&gt;
=== How to use the badge with pure Arduino code ===&lt;br /&gt;
If you prefer you can always start from scratch without FreeRTOS or any of our code, just keep in mind that you won’t be able to receive messages via radio or use any of the API features we already added. Just start a new sketch in the Arduino IDE for that and get going. If you want to load the main firmware again just change the sketch to “EMF2014” and upload again.&lt;br /&gt;
&lt;br /&gt;
=== Debugging and Gotchas ===&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
&lt;br /&gt;
=== Radio infrastructure ===&lt;br /&gt;
The radio infrastructure is distributed between DKs. Every “gateway” has a Raspberry Pi with two Ciseco USB radios. We never had the chance to actually try it with a large number of badges in the same spot, so please don’t expect it to work perfectly.&lt;br /&gt;
&lt;br /&gt;
=== Your own wireless badge network ===&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
=== Contribute ===&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3795</id>
		<title>TiLDA MKe</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe&amp;diff=3795"/>
		<updated>2014-11-28T17:05:29Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TiLDA MKe project, Code name &amp;quot;ElectroMagnetic Boogaloo&amp;quot;, is being headed by [[User:Dpslwk|'RepRap' Matt]] and [[User:thinkl33t|Bob]]&lt;br /&gt;
[[File:IMG_0474.jpg|500px|right|thumb|Front]]&lt;br /&gt;
[[File:Badge_Front.png|right|thumb|Front]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/E_(mathematical_constant) Why MKe?]&lt;br /&gt;
&lt;br /&gt;
Please Note: There are a couple of minor hardware and some firmware issues that might be effecting your badge. If you've let the magic smoke out of your charge controller or have tried to re-flash and ended up with nothing but a couple of dimly glowing lights then DO NOT DESPAIR -It's recoverable and fixes, documentation and lots of firmware are still being produced :)&lt;br /&gt;
&lt;br /&gt;
=Aim= &lt;br /&gt;
The main aim of the 2014 badge is to give camp attendees live schedule updates and notifications. As with the original TiLDA we wanted to keep with an Arduino compatible platform that will allow badge hacking during and after the camp. As with the previous badge all code and design files are available.&lt;br /&gt;
&lt;br /&gt;
==Battery Warning==&lt;br /&gt;
'''Always make sure you plug your battery in the right way round!'''  If you don't, the charge controller will let out its magic smoke and die / become damaged and die later.  The badge itself will still work, but it wont have the ability to charge anymore.  &lt;br /&gt;
&lt;br /&gt;
We think this is the cause of the charge controller issues a small number of badges had at the event was due to this mistake being made during final assembly on-site. &lt;br /&gt;
&lt;br /&gt;
'''Lithium Batteries are dangerous!'''  While these batteries are better protected than the MK1 batteries, they are still scary.  Do not short your battery, and if it starts bulging or gets punctured, '''DO NOT USE IT AGAIN''' and dispose of it properly.&lt;br /&gt;
&lt;br /&gt;
==Features and Functions==&lt;br /&gt;
[[File:Badge_Back.png|right|thumb|Back]]&lt;br /&gt;
* Torch mode - Press the light button next to the screen. It will only light up fully if it's hung upside down to avoid blinding&lt;br /&gt;
* Snake&lt;br /&gt;
* Tetris&lt;br /&gt;
&lt;br /&gt;
== How to get going ==&lt;br /&gt;
=== Set up your environment ===&lt;br /&gt;
* Plug your badge into your computer via USB&lt;br /&gt;
* Download Arduino IDE 1.5.7 from http://arduino.cc/en/main/software#toc3&lt;br /&gt;
* “git clone” or download TiLDA source code from https://github.com/emfcamp/Mk2-Firmware&lt;br /&gt;
* Start the Arduino IDE. &lt;br /&gt;
* Now you have to change the sketchbook-folder to be the folder you just cloned. To do this use File | Preferences | “Set Sketchbook location”. On MacOS, this is Arduino | Preferences &lt;br /&gt;
* Restart the Arduino IDE&lt;br /&gt;
* Open sketch “EMF2014”&lt;br /&gt;
* Set Tools | Board to MKe v0.333 (RTOS Core)&lt;br /&gt;
* Set Tools | Port to correct port (you might have to research this - some operating systems like Windows require you to install drivers or become a member of a certain group)&lt;br /&gt;
** On MacOS this is will start /dev/tty.usbmodem with 4 digits, and change for each port&lt;br /&gt;
** On Linux this is usually /dev/ttyACM0 but may be a higher number if you have other USB Serial devices&lt;br /&gt;
* Hit the upload button&lt;br /&gt;
* Wait&lt;br /&gt;
* Woohoo - You just successfully uploaded code to your badge&lt;br /&gt;
&lt;br /&gt;
=== Your first “Hello world” app ===&lt;br /&gt;
There’s a “HelloWorldApp.cpp” file in which you can play around. In order for it to show up on the Homescreen you have to uncomment line 51 in AppManager.cpp and flash the changed code to the badge. Great app pull requests are appreciated!&lt;br /&gt;
&lt;br /&gt;
If you are still using the Arduino IDE at this point, note that it will not let you edit the .cpp and .h files that are needed to create Apps for the badge. To force the IDE to re-compile/re-read any files you've edited using an external editor, make sure to go to the File -&amp;gt; Preferences dialog box, and check the &amp;quot;Use external editor&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
=== Why are things so different from standard Arduino code? ===&lt;br /&gt;
We’re using a library called FreeRTOS that allows us to multitask - something that’s normally not possible with standard Arduino code. This allows us to run multiple tasks at the same time. FreeRTOS uses preemptive scheduling to switch between the task. Due to this we have to be very careful about how we do some things. For example we can’t just define interrupts for buttons in every task (imagine the mess!) or write to the serial port directly (your task might stop in the middle of the message). &lt;br /&gt;
&lt;br /&gt;
We’ve also spend quite a lot of time to make the build-in components as easy to use as possible without having every task to write lots of boilerplate code. If you feel like using the build-in components on the badge, chances are we already wrote a wrapper for them that is already used by one of the other tasks. &lt;br /&gt;
&lt;br /&gt;
Have a look at the “Documentation” section in this document for a full list of API functions. You will avoid a lot of headaches if you stick to those.&lt;br /&gt;
=== How to use the badge with pure Arduino code ===&lt;br /&gt;
If you prefer you can always start from scratch without FreeRTOS or any of our code, just keep in mind that you won’t be able to receive messages via radio or use any of the API features we already added. Just start a new sketch in the Arduino IDE for that and get going. If you want to load the main firmware again just change the sketch to “EMF2014” and upload again.&lt;br /&gt;
=== Debugging and Gotchas ===&lt;br /&gt;
* The USB serial is set up to 115200 baud. There are lots of terminals that can connect to them. See below for how to enable the debug logging.&lt;br /&gt;
* If you can’t revive a badge you can short the two erase pins and press the reset button while holding it down.&lt;br /&gt;
* Avoid busy waiting, use FreeRTOS queues and Tilda::delay() instead&lt;br /&gt;
* Don’t use low level functions like interrupts or serial ports directly unless you really, really know how FreeRTOS will handle them. For general logging you can use Tilda::log()&lt;br /&gt;
* If sending code to the badge using the Arduino IDE &amp;quot;Upload&amp;quot; button fails, even though the /dev/ttyACM0 (linux com port) is there, just retry, twice if neccessary.&lt;br /&gt;
&lt;br /&gt;
=== Code structure ===&lt;br /&gt;
* FreeRTOS has the concept of “Tasks” which work like threads. We’ve wrappered them in a class called “Task” (for background stuff) and “Apps” (for foreground, one-at-a-time things)&lt;br /&gt;
* Everything needs to be in the main EMF2014 folder. Subfolders are not allowed. This is an Arduino IDE restriction :(&lt;br /&gt;
=== Radio infrastructure ===&lt;br /&gt;
The radio infrastructure is distributed between DKs. Every “gateway” has a Raspberry Pi with two Ciseco USB radios. We never had the chance to actually try it with a large number of badges in the same spot, so please don’t expect it to work perfectly.&lt;br /&gt;
&lt;br /&gt;
=== Your own wireless badge network ===&lt;br /&gt;
[[DIY TiLDA Badge Network]] has instructions on how to setup your own private badge network using a RaspberryPi and two Ciseco radios.&lt;br /&gt;
&lt;br /&gt;
=== Contribute ===&lt;br /&gt;
Send us a pull request via [https://github.com/emfcamp/Mk2-Firmware GitHub] - We’ll do our best to review and merge the good ones during EMF so others can use them.&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
The following hardware has been included on the badge.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/products/microcontrollers/arm/sam3x.aspx Atmel ATSAM3X8E]&lt;br /&gt;
** This is the same chip as the [http://arduino.cc/en/Main/ArduinoBoardDue Arduino Due] and gives us the base platform for the badge&lt;br /&gt;
** 32bit ARM Cortex M3 * 84MHz&lt;br /&gt;
** 512KBytes Flash RAM&lt;br /&gt;
** 96KBytes of SRAM&lt;br /&gt;
* A 128x64 pixel monochrome LCD display&lt;br /&gt;
* [http://shop.ciseco.co.uk/srf-wireless-rf-radio-surface-mount/ Ciseco SRF Radio]&lt;br /&gt;
** 868Mhz RF Transceiver&lt;br /&gt;
** Simple UART interface&lt;br /&gt;
** Low power sleep mode&lt;br /&gt;
* [http://www.invensense.com/mems/gyro/mpu6050.html MPU-6050] 3-axis Accelerometer and 3-axis gyro&lt;br /&gt;
** I2C interface&lt;br /&gt;
** Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps&lt;br /&gt;
** Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g&lt;br /&gt;
** Digital Motion Processing™ (DMP™) engine offloads complex MotionFusion, sensor timing synchronisation and gesture detection&lt;br /&gt;
* PMIC &amp;amp; LiPo&lt;br /&gt;
* Joystick&lt;br /&gt;
* Buttons&lt;br /&gt;
* RGB LEDs&lt;br /&gt;
* IR&lt;br /&gt;
* Arduino Headers&lt;br /&gt;
* Pads for wearable tech&lt;br /&gt;
&lt;br /&gt;
= Firmware Documentation =&lt;br /&gt;
== Debugging ==&lt;br /&gt;
===Enabling the USB serial debug log messages===&lt;br /&gt;
To enable the debug logging you must uncomment the following line in [https://github.com/emfcamp/Mk2-Firmware/blob/master/hardware/emfcamp/sam/libraries/debug/debug.h#L42 hardware/emfcamp/sam/libraries/debug/debug.h]&lt;br /&gt;
&lt;br /&gt;
 // Enable debug task and output&lt;br /&gt;
 // #define DEBUG 1&lt;br /&gt;
&lt;br /&gt;
===Tilda::log(String text)===&lt;br /&gt;
&lt;br /&gt;
This logs “text” to the serial console. To read it connect to it via the Arduino IDE Serial Monitor. Don’t use “SerialUSB.println” or similar -- it’s not thread-safe and you might end up with utter nonsense.&lt;br /&gt;
&lt;br /&gt;
===Debugging using the JTAG interface===&lt;br /&gt;
The JTAG interface on the board provides powerful debugging facilities like breakpoints, backtraces, dumping memory, inspecting variables, checking task states, catching exeptions etc. To make this to work requires additional hardware and software, see [[TiLDA Debugging using JTAG]].&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
The badge has 8 buttons: Up, Down, Left, Right, Center (on the joystick), A, B and Light. You can use arduino-style “digitalRead(BUTTON_RIGHT)” to read the current status of any button, but you can’t define your own interrupt (because we already did that). This doesn’t mean you can’t wait for a certain button to be pressed, it just means you have to approach it slightly differently:&lt;br /&gt;
&lt;br /&gt;
Example: A simple app displaying the button code&lt;br /&gt;
 void ButtonApp::task() {&lt;br /&gt;
     ButtonSubscription allButtons = Tilda::createButtonSubscription(LIGHT | A | B | UP | DOWN | LEFT | RIGHT | CENTER);&lt;br /&gt;
 &lt;br /&gt;
     while(true) {&lt;br /&gt;
         Button button = allButtons.waitForPress(1000);&lt;br /&gt;
         if (button == A) {&lt;br /&gt;
             debug::log(“You pressed button A”);&lt;br /&gt;
         } else if (button == LEFT) {&lt;br /&gt;
             debug::log(“You pressed LEFT”);&lt;br /&gt;
         } else if (button == NONE) {&lt;br /&gt;
             debug::log(“No button has been pressed in 1000ms”); &lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription Tilda::createButtonSubscription(&amp;lt;buttons&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
Registers a subscriptions for a defined set of buttons and returns a ButtonSubscription. Multiple Buttons can be combined via “|” (see example above). One button can not be subscribed by more than 10 subscriptions (which shouldn’t really happen, but keep it in mind). &lt;br /&gt;
&lt;br /&gt;
Don’t use this function in a constructor, it requires FreeRTOS to be running. Using it inside the task() function is the only safe place for it.&lt;br /&gt;
&lt;br /&gt;
===Button ButtonSubscription::waitForPress(TimeInTicks timeout)===&lt;br /&gt;
&lt;br /&gt;
This is normally called in a loop. It causes the task to block until one of the buttons has been pressed. If the timeout occurs before any button has been pressed “NONE” will be returned. &lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::waitForPress()===&lt;br /&gt;
&lt;br /&gt;
The same as above, but without the timeout.&lt;br /&gt;
&lt;br /&gt;
===ButtonSubscription::clear()===&lt;br /&gt;
&lt;br /&gt;
This should be called after an App has been suspended, just before it’s going to be resumed. It causes the Queue to be cleared which could otherwise lead to buttons being reported that have been pressed while other apps were in the foreground. Have a look at the FlashLightApp for an example.&lt;br /&gt;
&lt;br /&gt;
==LEDs==&lt;br /&gt;
===Tilda::setLedColor(Led led, Color color);===&lt;br /&gt;
===Tilde::setLedColor(Color color);===&lt;br /&gt;
&lt;br /&gt;
Sets the color of all or one led. Color is an object that takes red, green and blue as a value between 0 and 255 each. If no led is defined both leds will be set to the same color.&lt;br /&gt;
&lt;br /&gt;
Example: A simple color-changing task&lt;br /&gt;
 void ColorfulTask::task() {&lt;br /&gt;
     while(true) {&lt;br /&gt;
         Tilda::setLedColor(LED1, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 255, 0}); // Green&lt;br /&gt;
         Tilda::setLedColor(LED2, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
         Tilda::setLedColor(LED1, {0, 0, 255}); // Blue&lt;br /&gt;
         Tilda::setLedColor(LED2, {255, 0, 0}); // Red&lt;br /&gt;
         Tilda::delay(300);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Display==&lt;br /&gt;
&lt;br /&gt;
The Display Library is based on GLCDv3 (http://playground.arduino.cc/Code/GLCDks0108), docs (http://code.google.com/p/glcd-arduino/source/browse/trunk/glcd/doc/GLCD_Documentation.pdf) but adapted to support our screen.  The Init routine is called in the setup, and the LCDTask takes care of ensuring the screen is updated every 40ms if required (Unlike the original GLCD library, screen updates are decoupled from the graphics routines.)&lt;br /&gt;
&lt;br /&gt;
Also available is M2tklib (https://code.google.com/p/m2tklib/) which is a nice toolkit library.  Further details on using this will come later, but expect the main loop to be handled for you, and just passing the menu structure you require for your app.&lt;br /&gt;
&lt;br /&gt;
Right now, you can call the GLCD functions directly with GLCD.DrawBitmap() for example.  This is going to change to be accessed through the GUITask class in the near future, to ensure only one task at a time writes to the screen.  Expect this to be simply GUITask in place of GLCD, along with a registering a redraw call back to GUITask. The bitmap format, by the way, is rather unconventional but there are a couple of utility scripts to convert popular formats down in the hacking section below - you can grab the SponsorsApp.h as an example and swap out the bitmap array with one of your choosing.&lt;br /&gt;
&lt;br /&gt;
Extra features that are included, GLCD.SetRotation() will handle rotation of the screen for you, and GLCD.CurrentWidth() and GLCD.CurrentHeight will give you the correct Width and Height for the current orientation.  GLCD.Width and GLCD.Height constants are not available, and the GLCD predefined Text areas will not be rotated for you, if you require this define your own text areas.&lt;br /&gt;
&lt;br /&gt;
Note that one function was not ported to the badge version of GLCD, &amp;quot;Printf&amp;quot;, you'll have to cope without it.&lt;br /&gt;
&lt;br /&gt;
== Sound == &lt;br /&gt;
There's a piezo on the board, but we haven't added code for it to the current firmware. Pull requests are very welcome!&lt;br /&gt;
&lt;br /&gt;
== IMU ==&lt;br /&gt;
=== Tilda::getOrientation ===&lt;br /&gt;
returns &amp;quot; ORIENTATION_HELD&amp;quot;, &amp;quot;ORIENTATION_RIGHT&amp;quot; (joystick to the right of the screen), &amp;quot;ORIENTATION_HUNG&amp;quot; or &amp;quot;ORIENTATION_LEFT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Flash Storage ==&lt;br /&gt;
We have 2mb of flash storage, but we're not using it in the main firmware - Please get this working!&lt;br /&gt;
== Data: Schedule ==&lt;br /&gt;
===Tilda::getDataStore().getSchedule(day, location) ===&lt;br /&gt;
== Date: Weather Forecast ==&lt;br /&gt;
===Tilda::getDataStore().getWeatherForecast()===&lt;br /&gt;
== Radio ==&lt;br /&gt;
There's no way of sending messages in the current version of the firmware, sorry :(&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
=== Tilda::delay(uint16_t delayInMs) === &lt;br /&gt;
&lt;br /&gt;
Works like Arduino’s delay(), but is FreeRTOS-safe. It’s safe to use this function before FreeRTOS has started.&lt;br /&gt;
&lt;br /&gt;
=== tilda::getClock() ===&lt;br /&gt;
&lt;br /&gt;
Returns an instance of https://github.com/MarkusLange/Arduino-Due-RTC-Library/blob/master/rtc_clock.h&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
===uint16_t tilda::getBadgeId()===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2.12. Battery==&lt;br /&gt;
===float TiLDA::getBatteryVoltage()===&lt;br /&gt;
Returns the current voltage as a float&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getBatteryPercent()===&lt;br /&gt;
Returns the current voltage as a percentage&lt;br /&gt;
&lt;br /&gt;
===uint8_t TiLDA::getChargeState()===&lt;br /&gt;
Returns the charge state&lt;br /&gt;
&lt;br /&gt;
0 Charging&lt;br /&gt;
1 Not Charging&lt;br /&gt;
&lt;br /&gt;
=Hacking=&lt;br /&gt;
To use our board definition you will need to first get the Arduino 1.5.7 IDE from [http://arduino.cc/en/Main/Software#toc3 here]&amp;lt;br/&amp;gt;&lt;br /&gt;
Next you can download the TiLDA MKe Firmware project from either the [https://github.com/emfcamp/Mk2-Firmware github repo] or via [https://github.com/emfcamp/Mk2-Firmware/archive/master.zip direct download]&amp;lt;br/&amp;gt;&lt;br /&gt;
Now copy the &amp;quot;hardware&amp;quot; folder to your Sketchbook folder, this is usually ~/Sketchbook/&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternative option is to set the Arduino 1.5.7 sketchbook folder to the Mk2-Firmware directory.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the Arduino IDE and your will be able to select TiLDA MKe v0.333 for the Tools-&amp;gt;Board menu&lt;br /&gt;
&lt;br /&gt;
* Draft 3d print-able and laser-able case files [http://www.thingiverse.com/thing:436815 here]&lt;br /&gt;
* A Python script (via [https://twitter.com/trotmaster99 @trotmaster99]) that converts a monochrome bitmap image into a format suitable for the Tilda can be found [http://pastebin.com/8XeazQjT here].&lt;br /&gt;
* A similar script in Perl to create TiLDA MKe fullscreen bitmaps from XBM: -&lt;br /&gt;
&amp;lt;div style =&amp;quot;height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid orange;&amp;quot;&amp;gt;&lt;br /&gt;
'''xbm2mke.pl by [[User:Msemtd]]'''&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!perl -w&lt;br /&gt;
use strict;&lt;br /&gt;
# Little script to convert a regular XBM to TiLDA MKe bitmap&lt;br /&gt;
# only tested with fullscreen bitmaps!&lt;br /&gt;
# Hot file handle magic...&lt;br /&gt;
select((select(STDERR), $| = 1)[0]);&lt;br /&gt;
select((select(STDOUT), $| = 1)[0]);&lt;br /&gt;
sub t(@);&lt;br /&gt;
sub d($);&lt;br /&gt;
sub chug($);&lt;br /&gt;
my $f = shift;&lt;br /&gt;
#~ $f = 'blankish.xbm' if not $f;&lt;br /&gt;
if(not defined $f or not $f =~ /^(.*)\.xbm$/i){&lt;br /&gt;
    die &amp;quot;Usage: gimme an XBM file dude!\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
my $name = $1;&lt;br /&gt;
t &amp;quot;Reading file '$f'...&amp;quot;;&lt;br /&gt;
my $data = chug($f);&lt;br /&gt;
t &amp;quot;OK&amp;quot;;&lt;br /&gt;
my @lines = split /^/, $data;&lt;br /&gt;
@lines = grep{chomp; s/^\s+//; s/\s+$//; length;} @lines;&lt;br /&gt;
#~ t d \@lines;&lt;br /&gt;
my($width, $height) = (0,0);&lt;br /&gt;
my @head = @lines[0..5];&lt;br /&gt;
foreach(@head){&lt;br /&gt;
    if(/_width\s+(\d+)/){$width = $1;}&lt;br /&gt;
    if(/_height\s+(\d+)/){$height = $1;}&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;width x height = $width x $height&amp;quot;;&lt;br /&gt;
my @k;&lt;br /&gt;
foreach(@lines){ push @k, split /,/; }&lt;br /&gt;
@k = grep { s/^.*(0x[0-9A-Fa-f]{1,2}).*$/$1/o; /(0x[0-9A-Fa-f]{1,2})/o } @k;&lt;br /&gt;
#~ t d \@k;&lt;br /&gt;
my $bc = scalar(@k);&lt;br /&gt;
t &amp;quot;Pulled out $bc hex bytes&amp;quot;;&lt;br /&gt;
if($bc != $width * $height / 8) {&lt;br /&gt;
    die &amp;quot;byte count $bc does not match that expected for w x h&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
t &amp;quot;OK - reorder bytes for MKe bitmap&amp;quot;;&lt;br /&gt;
my $wb = int($width/8) + (($width &amp;amp; 0x07) ? 1: 0);&lt;br /&gt;
t &amp;quot;width in whole bytes for $width pixels = $wb&amp;quot;;&lt;br /&gt;
my @mke;&lt;br /&gt;
for(my $col = 0; $col &amp;lt; $wb; $col++){&lt;br /&gt;
    for(my $row = $height - 1; $row &amp;gt;= 0; $row--){&lt;br /&gt;
        my $idx = ($row * $wb) + $col;&lt;br /&gt;
        my $val = $k[$idx];&lt;br /&gt;
        #~ t &amp;quot;Column $col + Row $row = idx $idx = $val&amp;quot;;&lt;br /&gt;
        push @mke, $val;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
my $out = &amp;quot;static const uint8_t &amp;quot;.uc($name).&amp;quot;_BM[] = {\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $width, // width\n&amp;quot;&lt;br /&gt;
	.&amp;quot;    $height , // height\n&amp;quot;;&lt;br /&gt;
#~ $out .= join(&amp;quot;, &amp;quot;, @mke);&lt;br /&gt;
while(scalar @mke){&lt;br /&gt;
	$out .= join(&amp;quot;, &amp;quot;, splice(@mke, 0, 16)).&amp;quot;,\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
$out .= &amp;quot;};\n&amp;quot;;&lt;br /&gt;
# meh, just print it out&lt;br /&gt;
t $out;&lt;br /&gt;
&lt;br /&gt;
sub t(@) {&lt;br /&gt;
    foreach (@_) {&lt;br /&gt;
       print STDOUT &amp;quot;$_\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
sub d($) {&lt;br /&gt;
    require Data::Dumper;&lt;br /&gt;
    my $s = $_[0];&lt;br /&gt;
    my $d = Data::Dumper::Dumper($s);&lt;br /&gt;
    $d =~ s/^\$VAR1 =\s*//;&lt;br /&gt;
    $d =~ s/;$//;&lt;br /&gt;
    chomp $d;&lt;br /&gt;
    return $d;&lt;br /&gt;
}&lt;br /&gt;
sub chug($) {&lt;br /&gt;
  my $filename = shift;&lt;br /&gt;
  local *F;&lt;br /&gt;
  open F, &amp;quot;&amp;lt; $filename&amp;quot; or die &amp;quot;Couldn't open `$filename': $!&amp;quot;;&lt;br /&gt;
  local $/ = undef;&lt;br /&gt;
  return &amp;lt;F&amp;gt;;&lt;br /&gt;
}  # F automatically closed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id=github&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
All the source code and designs are on openly available on Github:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Hardware Hardware] - the full board design&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Documentation Documentation] - a dump of relevant parts datasheets&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Firmware Firmware] - source code for the badge software&lt;br /&gt;
* [https://github.com/emfcamp/Mk2-Software Software] - server-side software for the network&lt;br /&gt;
&lt;br /&gt;
If you want to help, point your IRC client to #tilda on Freenode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Badges]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3794</id>
		<title>TiLDA MKe Competition</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3794"/>
		<updated>2014-11-28T14:03:40Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Now that EMF is over and you've returned home, its time to dig out your EMF badge and start playing!&lt;br /&gt;
&lt;br /&gt;
We'll be rewarding the best hack using the badge with '''two tickets to EMF 2016''', and '''two tickets to the one-day event in 2015'''. We might also have '''other prizes available''' for hacks in different categories!&lt;br /&gt;
&lt;br /&gt;
==Submitting your hack==&lt;br /&gt;
Email [mailto:competition@emfcamp.org competition@emfcamp.org] with the details of your hack, either linking to an existing website or attaching documentation to the email.&lt;br /&gt;
&lt;br /&gt;
'''Submissions close on the 31st March 2015 at midnight''', with the winners being announced on April 15th.&lt;br /&gt;
&lt;br /&gt;
==My badge is broken so I can't enter!==&lt;br /&gt;
If your badge was one of the few that suffered a hardware failure, [mailto:badge@emfcamp.org get in touch] and we'll be happy to replace it so you can take part in the competition.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3793</id>
		<title>TiLDA MKe Competition</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=TiLDA_MKe_Competition&amp;diff=3793"/>
		<updated>2014-11-28T14:01:30Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Created page with &amp;quot;Now that EMF is over and you've returned home, its time to dig out your EMF badge and start playing!  We'll be rewarding the best hack using the badge with '''two tickets to E...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Now that EMF is over and you've returned home, its time to dig out your EMF badge and start playing!&lt;br /&gt;
&lt;br /&gt;
We'll be rewarding the best hack using the badge with '''two tickets to EMF 2016''', and '''two tickets to the one-day event in 2015'''. We might also have '''other prizes available''' for hacks in different categories!&lt;br /&gt;
&lt;br /&gt;
==Submitting your hack==&lt;br /&gt;
Email [mailto:competition@emfcamp.org competition@emfcamp.org] with the details of your hack, either linking to an existing website or attaching documentation to the email.&lt;br /&gt;
&lt;br /&gt;
'''Submissions close on the 31st March 2015 at midnight''', with the winners being announced on April 15th.&lt;br /&gt;
&lt;br /&gt;
==My badge is broken!==&lt;br /&gt;
If your badge was one of the few that suffered a hardware failure, [mailto:contact@emfcamp.org get in touch] and we'll be happy to replace it so you can take part in the competition.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3785</id>
		<title>Accounting</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3785"/>
		<updated>2014-10-22T15:51:16Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The EMF 2014 account breakdown is yet to be published due to ongoing discussions with suppliers.&lt;br /&gt;
&lt;br /&gt;
If you would like to receive an email when the accounts are ready please '''[https://docs.google.com/forms/d/1jTV0fYtV0A-MEUemzIM06IGN-sWZX4hdeVvy5GwR5_A/viewform fill in this form]'''.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3784</id>
		<title>Accounting</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3784"/>
		<updated>2014-10-22T15:51:00Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The EMF 2014 account breakdown is yet to be published due to ongoing discussions with suppliers.&lt;br /&gt;
&lt;br /&gt;
If you would like to receive an email when the budget is ready please '''[https://docs.google.com/forms/d/1jTV0fYtV0A-MEUemzIM06IGN-sWZX4hdeVvy5GwR5_A/viewform fill in this form]'''.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Budget&amp;diff=3783</id>
		<title>Budget</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Budget&amp;diff=3783"/>
		<updated>2014-10-22T15:50:37Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Jonty moved page Budget to Accounting: Whoops, this is accounting not budget. Sorry.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Accounting]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3782</id>
		<title>Accounting</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3782"/>
		<updated>2014-10-22T15:50:36Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Jonty moved page Budget to Accounting: Whoops, this is accounting not budget. Sorry.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The EMF 2014 budget has yet to be published due to ongoing discussions with suppliers.&lt;br /&gt;
&lt;br /&gt;
If you would like to receive an email when the budget is ready please '''[https://docs.google.com/forms/d/1jTV0fYtV0A-MEUemzIM06IGN-sWZX4hdeVvy5GwR5_A/viewform fill in this form]'''.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3781</id>
		<title>Accounting</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Accounting&amp;diff=3781"/>
		<updated>2014-10-22T15:44:03Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Created page with &amp;quot;The EMF 2014 budget has yet to be published due to ongoing discussions with suppliers.  If you would like to receive an email when the budget is ready please '''[https://docs....&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The EMF 2014 budget has yet to be published due to ongoing discussions with suppliers.&lt;br /&gt;
&lt;br /&gt;
If you would like to receive an email when the budget is ready please '''[https://docs.google.com/forms/d/1jTV0fYtV0A-MEUemzIM06IGN-sWZX4hdeVvy5GwR5_A/viewform fill in this form]'''.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3693</id>
		<title>Feedback</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3693"/>
		<updated>2014-09-10T16:18:08Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
Please let us know what went well and what didn't go well at EMF this year. We really do care about your feedback and we'll try and improve this for next time.&lt;br /&gt;
&lt;br /&gt;
Add your feedback below:&lt;br /&gt;
&lt;br /&gt;
== Good Stuff ==&lt;br /&gt;
&lt;br /&gt;
* Location&lt;br /&gt;
* Badges&lt;br /&gt;
* Variety of talks [+1]&lt;br /&gt;
* Showers [+∞]&lt;br /&gt;
* Hand washing facilities&lt;br /&gt;
** putting the showers (with hot water in handbasins) next to toilets v.good&lt;br /&gt;
* Parking&lt;br /&gt;
* Shuttle trailer to car park&lt;br /&gt;
** ... and shuttle to BLY railway station. Made coming by public transport a doddle.&lt;br /&gt;
* Power &amp;amp; data infrastructure - pretty much rock solid throughout! [+2]&lt;br /&gt;
* Speedy response of volunteers/organisers to problem resolution&lt;br /&gt;
* Service at the bar was good (while the drinks lasted), and it was very nice to have ''multiple'' indoor social spaces, esp for people who wanted a quieter lounge as well as louder bar.&lt;br /&gt;
** Being able to check beer availability on the till website was awesome!&lt;br /&gt;
** The lounge was great - the decorations, beanbags, no-shoes rule and power were a great combination&lt;br /&gt;
* Floor panel roads [+5]&lt;br /&gt;
* String lights (cut through to showers was awesome!) [+2]&lt;br /&gt;
* Ability to hire tables/chairs/marquees/hay bales etc. - were all good quality, too. [+2]&lt;br /&gt;
* Kids workshops [+2]&lt;br /&gt;
* Arcade! [+1]&lt;br /&gt;
* Friendliness of other attendees [+1]&lt;br /&gt;
* First aid [+1]&lt;br /&gt;
* Shop - selling books of speakers was a really nice idea, and it was good to talk to speakers &amp;amp; do signing there afterwards.&lt;br /&gt;
* That spinning music installation.&lt;br /&gt;
* Lighting - I didn't have to turn my torch on at all, but it was still dark enough in my tent to sleep.&lt;br /&gt;
* Club Mate.&lt;br /&gt;
* Ring making workshop&lt;br /&gt;
* Lake was pretty&lt;br /&gt;
* Supportive atmosphere for speakers and very nice feedback afterwards&lt;br /&gt;
* Water: plentiful flow, tasty water, cool dispensers [+1]&lt;br /&gt;
** Hand soap by taps (udders?)&lt;br /&gt;
* Keeping toilet paper supplies topped up in all the toilets&lt;br /&gt;
* Nice choice of real ales and proper cider&lt;br /&gt;
* Lasershow + Chiptunes in Tent A&lt;br /&gt;
* Tschunk&lt;br /&gt;
* Everything that Dimitri brought along [+1]&lt;br /&gt;
* EMF CTF: Like getting lock pickers to cook your food, playing IRL replay,relay and pre-play attacks and memory corruption, sadly no real-life cross-site scripting :)&lt;br /&gt;
* Tea and food provided during set up really helped me keep going.&lt;br /&gt;
* How to crimp ethernet cable sheets were brilliant. They made sure everyone was using the same standard and anyone new to crimping could carry them to remember the order.&lt;br /&gt;
* There were lots of crimping tools and wire strippers to borrow during set up.&lt;br /&gt;
* Vehicles: there were enough to get stuff around the site but not too many that I was worried about getting run over.&lt;br /&gt;
* EMF hi vis jackets were awesome.&lt;br /&gt;
* Simon Singh [+1]&lt;br /&gt;
* Till system in the bar - I found it very quick and easy to use after about 10 mins practice.&lt;br /&gt;
* Cashback in the bar.&lt;br /&gt;
* Dutch food.&lt;br /&gt;
* Laser cut items for sale.&lt;br /&gt;
* Badge creations competition is a nice way to encourage people to tinker with the badges and share the results.&lt;br /&gt;
* Wristbands&lt;br /&gt;
** Fabric was much more comfortable than paper/Tyvek/plastic, and they were pretty too!&lt;br /&gt;
* T-shirts&lt;br /&gt;
** Good choice of colours, sizes and fits, awesome design&lt;br /&gt;
&lt;br /&gt;
== Stuff that could be improved ==&lt;br /&gt;
&lt;br /&gt;
* Buy more beer! [[User:Russ|Russ]] ([[User talk:Russ|talk]]) [+1]&lt;br /&gt;
** No firkins next time, kils only! --[[User:Sde|Sde]] ([[User talk:Sde|talk]])&lt;br /&gt;
* Toilets... 'nuff said!  [[User:AndyB|AndyB]] ([[User talk:AndyB|talk]]) [+2]&lt;br /&gt;
** +1, I also suggest adding plastic bags/bins into the toilets, for (female) sanitary waste ([[User:Will-Do|Will-Do]])&lt;br /&gt;
** Agreed - I've seen portakabins (like the shower blocks) that containing proper flushing loos. They're ''much'' less stinky and likely to block up than the portaloos we had, which didn't always seem willing to drop their loads into their collection tanks, leading to nastiness and health hazards (even without the pumping contractor being rubbish)&lt;br /&gt;
*** This was actually what we wanted, but they're tremendously expensive. Suggestions for vendors welcome! --[[User:Jonty|Jonty]]&lt;br /&gt;
** Additionally, LIGHTS in the toilets.  Having to use my phone / badge as a torch to see what was going on while i cleaned off the toilet before sitting down was particularly difficult. [[User:Thinkl33t|Thinkl33t]] ([[User talk:Thinkl33t|talk]]) 20:05, 1 September 2014 (UTC)&lt;br /&gt;
** thunderboxes2go.co.uk are good and know how to handle local authority problems, they have done shambala for 10+ years - high enough capacity to not need emptying during the event [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** Maybe ask Cambridge &amp;amp; District CAMRA who provided the toilets for Cambridge 41st beer festival - they had some fairly nice flushing toilets which came on a trailer, a bit like the posh wash showers. I think Jonty mentioned that a lot of providers were put off by the fact that we're a festival. Well, if these guys are ok with providing for a beer festival, they must be pretty brave! -[[User:Alecjw]]&lt;br /&gt;
** Definite vote for the trailer-style flushing toilets, with multiple cubicles (+sinks, lights and mirrors) on one tow-along trailer, just like the showers. I've seen these at MANY festivals - though, granted, usually only in 'posh' camping/press/VIP areas. Should be possible if you manage to convince the providers that we're not a rowdy bunch of drunken teenagers!&lt;br /&gt;
** A clue to the problem with the chemical toilets is in the name: no chemical sanitiser/deodoriser was used in any toilet I tried. Adding Elsan or similar to the toilets would probably have made them much more acceptable. [[User:PhilSwinbank|PhilSwinbank]] ([[User talk:PhilSwinbank|talk]]) 22:18, 3 September 2014 (UTC)&lt;br /&gt;
* Make sure that drinking water is clearly labelled as such&lt;br /&gt;
* More food and drink options&lt;br /&gt;
** Eg. non-caffeine / low or no sugar options&lt;br /&gt;
** Chips!&lt;br /&gt;
** Jacket potato vendor&lt;br /&gt;
** Healthy 'green' food&lt;br /&gt;
** also possibly going on later, a lot of the places shut up shop quite early.&lt;br /&gt;
** queues at Pizza place were huge, wait time was &amp;gt;1hour at lunch time&lt;br /&gt;
** A late night vendor would be fantastic - doesn't have to be fancy food, but just something hot to eat after 9pm [+4]&lt;br /&gt;
** Soft drinks! [+2]&lt;br /&gt;
*** I helped organise a ball at university. Coca Cola sponsored us and provided very cheap (maybe free) drinks to the event. Before next time, someone remind me to look into them doing this for EMF [[User:MatS|MatS]] ([[User talk:MatS|talk]]) 14:02, 4 September 2014 (UTC)&lt;br /&gt;
* Survey positions of lanes/tents/DKs as early as possible before items arrive and mark out.--[[User:Sully|Sully]] ([[User talk:Sully|talk]]) 12:06, 1 September 2014 (UTC)&lt;br /&gt;
** This was planned but we were let down by the rather poor state of mobile GIS software. &lt;br /&gt;
*** there are multiple open source solutions for mapping, try https://umap.openstreetmap.fr/en/ or reach to out myself or #openstreetmap, there are many OSM'ers in the UK,  [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
* Similar to this, measure for fence panels and drop stillage appropriately, to avoid the need to carry loads of them right up the camping field by hand&lt;br /&gt;
* Make it longer! There was loads of cool stuff I didn't have change to check out :( After all that work everyone does, it was a shame I couldn't experience it all! ([[User:Chewie|Chewie]]) ((I still say make it a week long ;)  ([[User:BuildTheRobots|Fligg]]))&lt;br /&gt;
* Visibility of presentations in tents (brighter projectors/darker tents??) ([[User:StuartL]]) [+3]&lt;br /&gt;
* Use more plasma screens in stages instead of projectors ([[User:Markp]]).  Or (better, as then the speaker can point to things) black fabric shades for the screen or marquee roof&lt;br /&gt;
** Next time dark tents. This was a total nightmare, sorry. --[[User:Jonty|Jonty]] &lt;br /&gt;
*** Marquees with a blackout end are not unusual: the hire company perhaps should have advised on this? -[[User:Dermot|Dermot]] &lt;br /&gt;
*** Also I have experience producing seminar-type recordings for DVDs and am willing to help out with this next time. With controlled lighting and at least one extra camera on each stage you can ramp up the production values. If there is the will to do it and enough volunteers. And I'm absolutely not criticising what was done this year! -[[User:Dermot|Dermot]]&lt;br /&gt;
* washing points over drains/soakaway so the ground doesn't get muddy ([[User:Chewie|Chewie]]) [+4]&lt;br /&gt;
* Mark out/allocate spaces for villages who had pinpointed locations on maps ([[User:Markp]]) [+2]&lt;br /&gt;
** Space needed by villages was very hard to judge before they were set up, especially once non-village campers started on site ([[User:BuildTheRobots|Fligg]]) &lt;br /&gt;
* Improved arrangements for washing and washing up (and handling the waste water from that) [+1]&lt;br /&gt;
* Provide sanitizer gel dispensers at water points and near loos [+2]&lt;br /&gt;
* Have the schedule linked off the EMF main page&lt;br /&gt;
** It was, but not on the First day...we forgot! See &amp;quot;Programme&amp;quot; at the top of the main website. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Distribute and display paper schedules (even if their might be some last-minute changes) [+3]&lt;br /&gt;
** They were supposed to be available at the info tent, not sure what happened there. --[[User:Jonty|Jonty]]&lt;br /&gt;
** Or have small screens at the entrances to tents showing what's currently on &amp;amp; what's next.&lt;br /&gt;
*** We wanted to do this but simply ran out of time. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Much more workshop activity (more hands-on electronics and physical making) [+6]&lt;br /&gt;
** Next time: Many more workshop tents. We totally underestimated availability and demand. [+1] --[[User:Jonty|Jonty]]&lt;br /&gt;
* Do have component vendors (maybe at their cost for marquee/power/space)&lt;br /&gt;
** This is very difficult without a clear list of what will sell, as CPC was arranged to appear but wanted advisement ([[User:Stanto]])&lt;br /&gt;
*** Would the (longer and with more repeats next time) workshop list work as advisement? Could workshop leaders be asked to provide suggestions for components that would be good to have available on site after their workshop?&lt;br /&gt;
* Pick a flatter site (for ease of disabled access)&lt;br /&gt;
* Ask speakers for bio's to include with their abstracts.  Given them an abstract length up-front instead of editing it in an ad hoc way.  Confirm acceptance to speakers and workshop organisers earlier.&lt;br /&gt;
** Do this after talks have been accepted. I didn't write my talk so didn't know details until I got the OK.&lt;br /&gt;
** The CFP was a bit of a nightmare this year, we'll certainly be doing this in 2016. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Make and enforce a clear music curfew (say from midnight or 1am or 2am to 8 or 9am or 10am), to defend those sleeping from (eg) the technoevangelists and the drunk [+4]&lt;br /&gt;
** Perhaps try to select a site next time where we can make part of the site to be a quiet area, eg a part surrounded by trees for natural sound insulation. Then enforce a noise curfew there. I'm not keen on the idea of having a noise curfew covering the entire camp though. [[User:Alecjw]] [+1]&lt;br /&gt;
** Seconding enforced quiet/family camping area, but no overall noise curfew. It didn't take long to get away from the worst noise, and the end of the field by the kids' area was incredibly quiet (though strangely empty!!)&lt;br /&gt;
** Well, not quite - I need sleep to function, so camped in the quiet area - a nearby group thought 6:30am was the right time to turn on their music system. Not so good.&lt;br /&gt;
* Loos not so near food vendors (pong + visible urinals offputting) [+5]&lt;br /&gt;
* stronger enforcement/signage of quiet camping area [+5]&lt;br /&gt;
* an explicit invitation (with clear instructions) to report Code of Conduct violations in open ceremony, brochure, Twitter, etc. We had no direct reports to Team Comfort, but several anecdotal tweets after the event -- when it's much too late. [[User:Martind|Martind]] ([[User talk:Martind|talk]]) 20:58, 1 September 2014 (UTC) [+1]&lt;br /&gt;
* quieter, less-enclosed and more spacious bar (I suffer from social anxiety when I'm closed in with crowds, so I had a very sober emf!).  [[User:Jane C|Jane C]]&lt;br /&gt;
** perhaps an outdoor seating area if a larger marquee is too costly.&lt;br /&gt;
*** There was an outdoor seating area set back to the right of the bar under a marquee, however the marquee vendor put it in the wrong place a day late, so wasn't as obvious, and didn't get hay bales until Saturday evening. --[[User:Jonty|Jonty]]&lt;br /&gt;
* use our collective knowledge of technology to sort accessibility issues &lt;br /&gt;
**ring-fence money for things like closed-loop in the stages early on. &lt;br /&gt;
**ask people about their access requirements much earlier on - e.g. when they buy a ticket - so that there is more time to meet these requirements (or reach a workable compromise)&lt;br /&gt;
**Build some kind of working system for preventing able-bodied people from using the disabled loos and showers (radar keys that only work when the loo is empty?) [[User:Jane C|Jane C]]&lt;br /&gt;
***Disagree with this as it reduces overall toilet/shower bandwidth, but would wholly agree with a solution whereby those who could only use limited facilities (disabled, families, etc) could queue-jump into those facilities the moment they because available. [[User:StuartL|StuartL]]&lt;br /&gt;
*** I found it a bit odd that no-one was using the disabled shower. Sure, disabled people should have priority (queue jump), i thought, but if there's noone with a disability waiting, why not use it? Although I suppose if we operate it that way, the expected waiting time for a disabled person is in some cases higher than that of an able bodied person... (my intuition says that this happens when (number of people in queue)&amp;lt;(number of showers) but I haven't verified this) [[User:Alecjw]]&lt;br /&gt;
* Info desk didn't seem to have the details wrt. volunteers, so when I volunteered I was sent out and found I wasn't needed.  Suggest splitting the job - having a volunteer team leader (or several, in shifts) whose job it is to know who is where and also to make sure nobody gets stuck on a gate for 12 hours (eg. rotating people to more interesting places every couple of hours). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
** There was a separate volunteer manager in the same tent, this should not have happened. Sorry about that. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Also similar to this, a register of 'on call' people - excess volunteers who can deal with sudden demands for people (esp. in the case of fire I can imagine this would be extremely useful - you'd potentially need to cordon off a largish area very quickly, and that takes people.  More mundane reasons would be a talk/workshop accumulating a large queue that needs managing). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
** There were shifts for people to be &amp;quot;on call&amp;quot; but they weren't obvious. We'll make sure this is easier. --[[User:Jonty|Jonty]]&lt;br /&gt;
** with earlier (/working) workshop sign-up, I would have put myself on call - instead I was waiting to hear what workshops would be available when.&lt;br /&gt;
* add GPS or other location aware technology like BTLE/iBeacon to the badges for automatic now/next notifications [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
* Locking wristbands that don't get any tighter. [+1]&lt;br /&gt;
* Having a tent for Badge Operations would be pretty handy - similar size to the workshop tent, that could be set up as a production line / fixing area if needed.  If not (hopefully) it would be a rolling workshop area for people to work of hacking their badges, writing new software, adding hardware etc. ~~&lt;br /&gt;
* Floor panel walkways were very slippery in the morning after rain, not sure if there's someway this can be improved&lt;br /&gt;
**Sprinkling some coarse sand on them might help. [[User:Moem|Moem]] ([[User talk:Moem|talk]])&lt;br /&gt;
* Better info on the bus between EMF &amp;lt;-&amp;gt; Bletchley so we know when they're running (alt: can we put GPS tracking on the buses?)&lt;br /&gt;
* The buses were quite cramped so it was hard for people to get large bags through seats&lt;br /&gt;
* More space between caterers and generator - the plant was right in the middle of prime catering space. --[[User:Nick|Nick]]&lt;br /&gt;
* Appoint a (i.e. volunteer someone as) project manager to draw up a plan (Gantt chart!?) of when everything's arriving and leaving (to the extent known) and what resources (telehandler, buggy, number of people) are needed. We'll never stick to the plan and things will arrive early/late run off schedule but the same person can adjust the plan to control the chaos during build-up, take-down and the event. Chuck them out of the way in a tent managing things rather than doing; site manager if you will. This role is distinct from Jonty and Russ as they have their own things to do.&lt;br /&gt;
*Maybe find a way to ensure volunteers get some time off? I saw a lot of people who seemed to be always working. I guess that partly shows a need for far more casual volunteers, but perhaps also that some of the more technical jobs might need training-in for earlier? Also, there could be a need for more willingness to delegate occasionally? -[[User:Dermot|Dermot]]&lt;br /&gt;
&lt;br /&gt;
==Suggestions==&lt;br /&gt;
* Ask for an optional email address for each ticket to go on your announce only mailing list.  Only the person that bought the tickets got your emails and they were slow to forward them on meaning most messages were received too late.&lt;br /&gt;
* Ask for age of children when booking, to give better planning stats for workshops etc. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* A talk (a bit like lightning talks) where people are given 5-10 minutes to share what they did with the previous event's badge. (If someone sends me the competition winners/runners up, I'll co-ordinate it) [[User:MatS|MatS]] ([[User talk:MatS|talk]]) 07:54, 1 September 2014 (UTC)&lt;br /&gt;
* Pre-paid accounts for spending money on food/beer/whatever to negate need for cash ([[User:Markp]])&lt;br /&gt;
* Have a fleet of communal wheel-barrows to help people transport their stuff from car to campsite [+2]&lt;br /&gt;
** Stepney City Farm have a fleet of broken wheelbarrows – fix ’em, use ’em, everybody wins! ([[User:Andylolz]])&lt;br /&gt;
** Or purchase some sack trolleys&lt;br /&gt;
* contactless payment gear for food, beer, workshops&lt;br /&gt;
** We had contactless payment for beer! (And we also offered cashback.) We should have messaged that better. Contactless payment for other things is complex, as we don't really control them. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* forewarn food vendors to expect all-day demand, not just mealtimes, so they can stock and staff appropriately [+1]&lt;br /&gt;
** food vendors were pretty much *events* caterers, used to feeding people snacks/lunch, we need *festival* caterers who are used to feeding people who are staying for a number of days. thethalicafe.co.uk? bedouin tent (shambala)? +late night options [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
*** It's really difficult to get caterers. Now we're a bit better known it's getting easier. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* pinboard (offline) notice board everyone can contribute to (lost property, mini event notices eg rocket launches, would like to meet.., etc) [+1]&lt;br /&gt;
** This was supposed to be next to the info tent, but got lost in the last-minute panic. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Ask people who want to give workshops if they'd be happy to give more than one session - the blacksmiths' output was extreme, but even giving two or three sessions would greatly increase the % of attendees who could sign up.&lt;br /&gt;
** Many workshop submissions specified that already, the issue was actually with finding space for them as we only had one workshop tent. We'll have many next time! --[[User:Jonty|Jonty]]&lt;br /&gt;
* Sign-ups some kind of &amp;quot;express preference&amp;quot; systems, so most people (including those who don't check email regularly) can get at least one of their top choices, rather than first-come-first-served.&lt;br /&gt;
** Online workshop sign-up is a priority for next year. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Board games tent in the evenings [+4]&lt;br /&gt;
** was the lounge not appropriate? Stages B &amp;amp; C were mostly empty on an evening; would tables have sufficed?&lt;br /&gt;
* Poker tent&lt;br /&gt;
* Be less ambitious with badge functionality [+3]&lt;br /&gt;
** And provide full documentation of features/functionality [+1]&lt;br /&gt;
** And sample code for each function&lt;br /&gt;
** Perhaps a back-to-basics through-hole design that comes with soldering iron, solder and instructions?&lt;br /&gt;
** I think we might build on this design for the next event. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
** Software that doesn't involve an OS (but rather more conventional Arduinoery) might be more easily hackable by others during/after the event? Especially given libraries for people to do amusing things with the peer-to-peer radio...&lt;br /&gt;
*** That is actually much harder to build anything decent with. The badges are normal arduinos and all the libraries are available, you don't have to use the EMF OS, it was designed for people to write normal Arduino code for! --[[User:Jonty|Jonty]]&lt;br /&gt;
* EMF is unlike other festivals - for a large number of people, carrying kit to/from car is impractical and security walking every car through site is time-consuming and volunteer-intensive (not to mention the fact that cars driving off site weren't walked off). Suggest that the parking area is directly next to and easily accessible from the camping area (e.g. just separated by hay bales to stop cars driving on to the camping area).&lt;br /&gt;
** As a village/car user you could generally provide your own security person walking in front of the car. This works 2 fold: 1) security doesn't need to walk for you 2) less waiting time for you since you already provide someone to walk.&lt;br /&gt;
** The plan for this was to allow people to drive onto site on the Thursday evening. It wasn't very well communicated and we had a *very* tight setup schedule so we needed to reduce this as much as possible. This is ultimately an issue with our setup schedule&lt;br /&gt;
** It wouldn't work on this site, but for some locations it might be possible to have a drop-off point close to camping (with a limited number of cars at one time), better idea than having cars (ignition source) close to tents. Some people were taking the mickey on Monday morning, many people driving onto site that could have carried things instead tying up volunteer resources to escort them.&lt;br /&gt;
* Provide job descriptions for traffic control, parking and entrance gatehouse. Instructions were handed from volunteer to volunteer by word of mouth and whilst common sense prevailed, it would have been useful to have instructions as to what to do under certain circumstances and a list of answers to FAQs, e.g.:&lt;br /&gt;
** What if somebody didn't have a parking ticket and wanted to park?&lt;br /&gt;
** What if somebody was just dropping off - where should they do this?&lt;br /&gt;
** What times were shuttle buses running?&lt;br /&gt;
** What times the gates were open/closed?&lt;br /&gt;
** Have a priority queue for people with machine readable tickets (ie paper!)&lt;br /&gt;
** Volunteer training was lost by the wayside for some roles, we'll fix that. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Add suggested age ranges for all workshops, some of the &amp;quot;adult&amp;quot; workshops were also very suitable for children (e.g. electronic fashion, solar pv) or could have been run once in main workshop once in kid's area [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** This was supposed to happen but got missed off by accident. Apologies. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Bolt the fence from the right side, I know we didn't even want it at all but local authorities can be fussy, I've been at a festival before who did the same and they made them fix it during the event.. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Want the good coffee on Monday morning, especially for drivers :) Maybe in the car park to help persuade people off site. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Would be good to have eggs, fresh milk, bacon at the shop (there was a comment like &amp;quot;we don't have eggs, they break too easily&amp;quot; - so charge extra to cover this, though it's probably not as bad as you think..) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** The shop was being run by an external team, we didn't control what they stocked. --[[User:Jonty|Jonty]]&lt;br /&gt;
** Morrisons did a tent with Milk, Bread, Burgers, BBQs etc @ http://www.festivalofcycling.org/expo/name/morrisons/, might be worth asking them? [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]])&lt;br /&gt;
* Start ticket sales (a couple of months?) earlier, maybe with a slightly bigger difference between early ticket prices and full price to encourage attendees to get in early (which in turn would improve cashflow) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]]) [+1]&lt;br /&gt;
* Start ticket sales *now* whilst you have all the publicity or at least have a page up where people can register to be emailed once the next event has tickets for sale.  That way you get your current mailing list + everyone else who has only just learned about it as your audience. [[User:Alteralias|Alteralias]]&lt;br /&gt;
** Until we have a date/venue that is not a great plan, as we'd end up with a lot of refunds. --[[User:Jonty|Jonty]]&lt;br /&gt;
*** Please let us still register to be emailed as soon as 2016 is confirmed and then told as soon as ticket sales start?&lt;br /&gt;
*** Although a massive mailing list/Twitter/Facebook push might be a good idea so people are ready to hear that tickets are on sale.&lt;br /&gt;
* Cluster the talks into related-topic sessions&lt;br /&gt;
** This is very difficult due to availability of speakers, and we'd rather people with very specific interests had talks to go to all weekend rather than just on one afternoon. --[[User:Jonty|Jonty]]&lt;br /&gt;
*** More Q&amp;amp;A sessions like the security one, getting multiple speakers on a topic together for questions might be a better idea.&lt;br /&gt;
* Volunteering stuff ([[User:HughePaul|HughePaul]])&lt;br /&gt;
** Whiteboard in info tent for current issues / tasks, handover&lt;br /&gt;
** Have info tent next to security tent so both can be available at the same time and all the time.&lt;br /&gt;
*** The info tent and the gatehouse/security tent could be two sides of the same erection.&lt;br /&gt;
** have predefined named people in shifts for head of / coordination of volunteering (could also double as an info/security tent staff)&lt;br /&gt;
** maybe stream some talks in info tent so they don't feel like they are missing things&lt;br /&gt;
** more formal defined (and communicated) lost-property form and procedure&lt;br /&gt;
** define volunteer job roles to make handovers easier and so we know what we are meant to be doing&lt;br /&gt;
** Look at ways to guarantee volunteer attendance once they sign up.  Perhaps return small monetary amount at end of festival per shift done?  Just something to make sure people who sign up turn up&lt;br /&gt;
*** Food tokens at the end of the shift are how other events do it and could be good incentive.&lt;br /&gt;
* Have dedicated blog / tweet / website updating person/team - dedicated live media team would be great&lt;br /&gt;
* big screen with latest official event update tweets&lt;br /&gt;
** Very expensive to hire. --[[User:Jonty|Jonty]]&lt;br /&gt;
*** small screen with latest updates? even a 20 inch cycling through the latest tweets in a big font?&lt;br /&gt;
* info about getting DISconnected from DKs and leaving the site in vehicles&lt;br /&gt;
** all vehicles coming into site should have had it explained they needed to come get an escort to leave. this wasn't properly communicated and will be better next year (possibly printed on the camper tickets? --[[User:BuildTheRobots|BuildTheRobots]]&lt;br /&gt;
** This was badly handled, and we only realised when it was too late. --[[User:Jonty|Jonty]]&lt;br /&gt;
* perhaps worth putting up a summary of the overall budget after the event, so people can see what's costly?&lt;br /&gt;
* website needs to be designed around the info people need at the time&lt;br /&gt;
** days before the event front page should have location, travel, packing, instructions such as workshop booking, village booking, volunteering&lt;br /&gt;
** during it should have info about DKs, current day schedule (possibly whats on and next), links to streams, power and internet usage :), lost property instructions, latest updates/tweets&lt;br /&gt;
** after have thanks, photos, tilda sales, etc&lt;br /&gt;
* Some kind of welcome tent / meet-a-stranger area / badges saying &amp;quot;talk to me&amp;quot; (and not reliant on tech that might not be available/working till later on) / person-bingo-style game - deliberately flagged up as a way for people to meet new people, including if they came on their own / hadn't been to anything like this before. For many the whole event will be like that anyway - it wouldn't hurt to help out those shyer / newer / more awkward. Maybe there could be a welcoming/newbies/friendliness team prior to next time who came up with stuff to try of this nature (all utterly optional, of course)?&lt;br /&gt;
** Gregarious people on site to do welcome/orientation would be great (possibly just after getting your wrist band, as part of handing out welcome packs). Can we encourage people to get talking more in irc/mailing list so they have some people they already know once they arrive?&lt;br /&gt;
* More flying cars (requested by someone leaving site when asked what they thought was lacking)&lt;br /&gt;
* Dual controls quad-copter training. So someone can learn to fly and know the &amp;quot;instructer&amp;quot; can take over if it gets out of hand.&lt;br /&gt;
* A few people with cars were making trips out to the outdoor supplies store in Milton Keynes for camping stuff, might be worth figuring out if we could do a more official shop run to get stuff for people who don't have cars.&lt;br /&gt;
* Ability to gauge interest if you're thinking of giving a talk: It turned out lots of people could have given a talk on something interesting, but didn't think anyone else would be interested in hearing it. Something like a pledge page where people can &amp;quot;I could give a talk on x, y or z&amp;quot; and people then convince them to do it.&lt;br /&gt;
* Cash machines? Possibly expensive next year might be big enough.&lt;br /&gt;
** There was cashback available at the bar, which is much cheaper and easier to set up.  Its existence wasn't as well publicised as it could have been. [[User:Sde|Sde]] ([[User talk:Sde|talk]])&lt;br /&gt;
* Push button on the side of DKs so people can alert NOC their attendance is wanted.&lt;br /&gt;
** Also could request vehicle escort off site. -maybe a bunch of waterproof tweeting arduinos with big buttons. yay - more hardware deadlines!&lt;br /&gt;
* Hardwired field-phone to all villages and marquees if only so they can report back and request assistance from control.&lt;br /&gt;
* welcome packs handed out when you arrive. Possibly lanyard + laminated map, maybe even a fully printed booklet with info on talks/speakers/workshops and sponsor advertising, the &amp;quot;your closest&amp;quot; from the wiki and (emergency) contact numbers.&lt;br /&gt;
** You should have been given an information booklet with map on arrival containing most of this, if you were not, please let us know. It is not feasible to put talk/speaker/workshop information in the booklet as we have 150+ events over the weekend, and they change at short notice. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Public power sockets under the seats in the marquees. Means people can charge laptops and phones when watching talks and apparently this is done at other cons.&lt;br /&gt;
* Power lockers! Like swimming bath lockers but with an electric socket inside so people can lock stuff up to charge for an hour or so.&lt;br /&gt;
** +1 I think Colocker missed a trick here. They could have had secure charging lockers promoting their service :)&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3568</id>
		<title>Feedback</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3568"/>
		<updated>2014-09-04T13:47:37Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
Please let us know what went well and what didn't go well at EMF this year. We really do care about your feedback and we'll try and improve this for next time.&lt;br /&gt;
&lt;br /&gt;
Add your feedback below:&lt;br /&gt;
&lt;br /&gt;
== Good Stuff ==&lt;br /&gt;
&lt;br /&gt;
* Location&lt;br /&gt;
* Badges&lt;br /&gt;
* Variety of talks [+1]&lt;br /&gt;
* Showers [+∞]&lt;br /&gt;
* Hand washing facilities&lt;br /&gt;
** putting the showers (with hot water in handbasins) next to toilets v.good&lt;br /&gt;
* Parking&lt;br /&gt;
* Shuttle trailer to car park&lt;br /&gt;
** ... and shuttle to BLY railway station. Made coming by public transport a doddle.&lt;br /&gt;
* Power &amp;amp; data infrastructure - pretty much rock solid throughout! [+2]&lt;br /&gt;
* Speedy response of volunteers/organisers to problem resolution&lt;br /&gt;
* Service at the bar was good (while the drinks lasted), and it was very nice to have ''multiple'' indoor social spaces, esp for people who wanted a quieter lounge as well as louder bar.&lt;br /&gt;
** Being able to check beer availability on the till website was awesome!&lt;br /&gt;
* Floor panel roads [+4]&lt;br /&gt;
* String lights (cut through to showers was awesome!) [+1]&lt;br /&gt;
* Ability to hire tables/chairs/marquees/hay bales etc. - were all good quality, too. [+1]&lt;br /&gt;
* Kids workshops [+1]&lt;br /&gt;
* Arcade!&lt;br /&gt;
* Friendliness of other attendees&lt;br /&gt;
* First aid&lt;br /&gt;
* Shop - selling books of speakers was a really nice idea, and it was good to talk to speakers &amp;amp; do signing there afterwards.&lt;br /&gt;
* That spinning music installation.&lt;br /&gt;
* Lighting - I didn't have to turn my torch on at all, but it was still dark enough in my tent to sleep.&lt;br /&gt;
* Club Mate.&lt;br /&gt;
* Ring making workshop&lt;br /&gt;
* Lake was pretty&lt;br /&gt;
* Supportive atmosphere for speakers and very nice feedback afterwards&lt;br /&gt;
* Water: plentiful flow, tasty water, cool dispensers [+1]&lt;br /&gt;
** Hand soap by taps (udders?)&lt;br /&gt;
* Keeping toilet paper supplies topped up in all the toilets&lt;br /&gt;
* Nice choice of real ales and proper cider&lt;br /&gt;
* Lasershow + Chiptunes in Tent A&lt;br /&gt;
* Tschunk&lt;br /&gt;
* Everything that Dimitri brought along&lt;br /&gt;
* EMF CTF: Like getting lock pickers to cook your food, playing IRL replay,relay and pre-play attacks and memory corruption, sadly no real-life cross-site scripting :)&lt;br /&gt;
&lt;br /&gt;
== Stuff that could be improved ==&lt;br /&gt;
&lt;br /&gt;
* Buy more beer! [[User:Russ|Russ]] ([[User talk:Russ|talk]]) [+1]&lt;br /&gt;
** No firkins next time, kils only! --[[User:Sde|Sde]] ([[User talk:Sde|talk]])&lt;br /&gt;
* Toilets... 'nuff said!  [[User:AndyB|AndyB]] ([[User talk:AndyB|talk]]) [+2]&lt;br /&gt;
** Agreed - I've seen portakabins (like the shower blocks) that containing proper flushing loos. They're ''much'' less stinky and likely to block up than the portaloos we had, which didn't always seem willing to drop their loads into their collection tanks, leading to nastiness and health hazards (even without the pumping contractor being rubbish)&lt;br /&gt;
*** This was actually what we wanted, but they're tremendously expensive. Suggestions for vendors welcome! --[[User:Jonty|Jonty]]&lt;br /&gt;
** Additionally, LIGHTS in the toilets.  Having to use my phone / badge as a torch to see what was going on while i cleaned off the toilet before sitting down was particularly difficult. [[User:Thinkl33t|Thinkl33t]] ([[User talk:Thinkl33t|talk]]) 20:05, 1 September 2014 (UTC)&lt;br /&gt;
** thunderboxes2go.co.uk are good and know how to handle local authority problems, they have done shambala for 10+ years - high enough capacity to not need emptying during the event [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** Maybe ask Cambridge &amp;amp; District CAMRA who provided the toilets for Cambridge 41st beer festival - they had some fairly nice flushing toilets which came on a trailer, a bit like the posh wash showers. I think Jonty mentioned that a lot of providers were put off by the fact that we're a festival. Well, if these guys are ok with providing for a beer festival, they must be pretty brave! -[[User:Alecjw]]&lt;br /&gt;
** Definite vote for the trailer-style flushing toilets, with multiple cubicles (+sinks, lights and mirrors) on one tow-along trailer, just like the showers. I've seen these at MANY festivals - though, granted, usually only in 'posh' camping/press/VIP areas. Should be possible if you manage to convince the providers that we're not a rowdy bunch of drunken teenagers!&lt;br /&gt;
** A clue to the problem with the chemical toilets is in the name: no chemical sanitiser/deodoriser was used in any toilet I tried. Adding Elsan or similar to the toilets would probably have made them much more acceptable. [[User:PhilSwinbank|PhilSwinbank]] ([[User talk:PhilSwinbank|talk]]) 22:18, 3 September 2014 (UTC)&lt;br /&gt;
* Make sure that drinking water is clearly labelled as such&lt;br /&gt;
* More food and drink options&lt;br /&gt;
** Eg. non-caffeine / low or no sugar options&lt;br /&gt;
** Chips!&lt;br /&gt;
** Jacket potato vendor&lt;br /&gt;
** Healthy 'green' food&lt;br /&gt;
** also possibly going on later, a lot of the places shut up shop quite early.&lt;br /&gt;
** A late night vendor would be fantastic - doesn't have to be fancy food, but just something hot to eat after 9pm [+2]&lt;br /&gt;
* Survey positions of lanes/tents/DKs as early as possible before items arrive and mark out.--[[User:Sully|Sully]] ([[User talk:Sully|talk]]) 12:06, 1 September 2014 (UTC)&lt;br /&gt;
** This was planned but we were let down by the rather poor state of mobile GIS software. &lt;br /&gt;
*** there are multiple open source solutions for mapping, try https://umap.openstreetmap.fr/en/ or reach to out myself or #openstreetmap, there are many OSM'ers in the UK,  [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
* Similar to this, measure for fence panels and drop stillage appropriately, to avoid the need to carry loads of them right up the camping field by hand&lt;br /&gt;
* Make it longer! There was loads of cool stuff I didn't have change to check out :( After all that work everyone does, it was a shame I couldn't experience it all! ([[User:Chewie|Chewie]])&lt;br /&gt;
* Visibility of presentations in tents (brighter projectors/darker tents??) ([[User:StuartL]]) [+2]&lt;br /&gt;
** Next time dark tents. This was a total nightmare, sorry. --[[User:Jonty|Jonty]]&lt;br /&gt;
* washing points over drains/soakaway so the ground doesn't get muddy ([[User:Chewie|Chewie]]) [+3]&lt;br /&gt;
* Mark out/allocate spaces for villages who had pinpointed locations on maps ([[User:Markp]]) [+1]&lt;br /&gt;
* Use more plasma screens in stages instead of projectors ([[User:Markp]]).  Or (better, as then the speaker can point to things) black fabric shades for the screen or marquee roof&lt;br /&gt;
* Improved arrangements for washing and washing up (and handling the waste water from that) [+1]&lt;br /&gt;
* Provide sanitizer gel dispensers at water points and near loos [+1]&lt;br /&gt;
* Have the schedule linked off the EMF main page&lt;br /&gt;
** It was, but not on the First day...we forgot! See &amp;quot;Programme&amp;quot; at the top of the main website. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Distribute and display paper schedules (even if their might be some last-minute changes) [+2]&lt;br /&gt;
** They were supposed to be available at the info tent, not sure what happened there. --[[User:Jonty|Jonty]]&lt;br /&gt;
** Or have small screens at the entrances to tents showing what's currently on &amp;amp; what's next.&lt;br /&gt;
*** We wanted to do this but simply ran out of time. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Much more workshop activity (more hands-on electronics and physical making) [+5]&lt;br /&gt;
** Next time: Many more workshop tents. We totally underestimated availability and demand. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Do have component vendors (maybe at their cost for marquee/power/space)&lt;br /&gt;
** This is very difficult without a clear list of what will sell, as CPC was arranged to appear but wanted advisement ([[User:Stanto]])&lt;br /&gt;
* Pick a flatter site (for ease of disabled access)&lt;br /&gt;
* Ask speakers for bio's to include with their abstracts.  Given them an abstract length up-front instead of editing it in an ad hoc way.  Confirm acceptance to speakers and workshop organisers earlier.&lt;br /&gt;
** Do this after talks have been accepted. I didn't write my talk so didn't know details until I got the OK.&lt;br /&gt;
** The CFP was a bit of a nightmare this year, we'll certainly be doing this in 2016. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Make and enforce a clear music curfew (say from midnight or 1am or 2am to 8 or 9am or 10am), to defend those sleeping from (eg) the technoevangelists and the drunk [+4]&lt;br /&gt;
** Perhaps try to select a site next time where we can make part of the site to be a quiet area, eg a part surrounded by trees for natural sound insulation. Then enforce a noise curfew there. I'm not keen on the idea of having a noise curfew covering the entire camp though. [[User:Alecjw]] [+1]&lt;br /&gt;
** Seconding enforced quiet/family camping area, but no overall noise curfew. It didn't take long to get away from the worst noise, and the end of the field by the kids' area was incredibly quiet (though strangely empty!!)&lt;br /&gt;
* Loos not so near food vendors (pong + visible urinals offputting) [+5]&lt;br /&gt;
* stronger enforcement/signage of quiet camping area [+4]&lt;br /&gt;
* an explicit invitation (with clear instructions) to report Code of Conduct violations in open ceremony, brochure, Twitter, etc. We had no direct reports to Team Comfort, but several anecdotal tweets after the event -- when it's much too late. [[User:Martind|Martind]] ([[User talk:Martind|talk]]) 20:58, 1 September 2014 (UTC) [+1]&lt;br /&gt;
* quieter, less-enclosed and more spacious bar (I suffer from social anxiety when I'm closed in with crowds, so I had a very sober emf!).  [[User:Jane C|Jane C]]&lt;br /&gt;
** perhaps an outdoor seating area if a larger marquee is too costly.&lt;br /&gt;
*** There was an outdoor seating area set back to the right of the bar under a marquee, however the marquee vendor put it in the wrong place a day late, so wasn't as obvious, and didn't get hay bales until Saturday evening. --[[User:Jonty|Jonty]]&lt;br /&gt;
* use our collective knowledge of technology to sort accessibility issues &lt;br /&gt;
**ring-fence money for things like closed-loop in the stages early on. &lt;br /&gt;
**ask people about their access requirements much earlier on - e.g. when they buy a ticket - so that there is more time to meet these requirements (or reach a workable compromise)&lt;br /&gt;
**Build some kind of working system for preventing able-bodied people from using the disabled loos and showers (radar keys that only work when the loo is empty?) [[User:Jane C|Jane C]]&lt;br /&gt;
* Info desk didn't seem to have the details wrt. volunteers, so when I volunteered I was sent out and found I wasn't needed.  Suggest splitting the job - having a volunteer team leader (or several, in shifts) whose job it is to know who is where and also to make sure nobody gets stuck on a gate for 12 hours (eg. rotating people to more interesting places every couple of hours). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
** There was a separate volunteer manager in the same tent, this should not have happened. Sorry about that. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Also similar to this, a register of 'on call' people - excess volunteers who can deal with sudden demands for people (esp. in the case of fire I can imagine this would be extremely useful - you'd potentially need to cordon off a largish area very quickly, and that takes people.  More mundane reasons would be a talk/workshop accumulating a large queue that needs managing). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
** There were shifts for people to be &amp;quot;on call&amp;quot; but they weren't obvious. We'll make sure this is easier. --[[User:Jonty|Jonty]]&lt;br /&gt;
* add GPS or other location aware technology like BTLE/iBeacon to the badges for automatic now/next notifications [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
&lt;br /&gt;
==Suggestions==&lt;br /&gt;
* Ask for an optional email address for each ticket to go on your announce only mailing list.  Only the person that bought the tickets got your emails and they were slow to forward them on meaning most messages were received too late.&lt;br /&gt;
* Ask for age of children when booking, to give better planning stats for workshops etc. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* A talk (a bit like lightning talks) where people are given 5-10 minutes to share what they did with the previous event's badge. (If someone sends me the competition winners/runners up, I'll co-ordinate it) [[User:MatS|MatS]] ([[User talk:MatS|talk]]) 07:54, 1 September 2014 (UTC)&lt;br /&gt;
* Pre-paid accounts for spending money on food/beer/whatever to negate need for cash ([[User:Markp]])&lt;br /&gt;
* Have a fleet of communal wheel-barrows to help people transport their stuff from car to campsite [+1]&lt;br /&gt;
** Stepney City Farm have a fleet of broken wheelbarrows – fix ’em, use ’em, everybody wins! ([[User:Andylolz]])&lt;br /&gt;
** Or purchase some sack trolleys&lt;br /&gt;
* contactless payment gear for food, beer, workshops&lt;br /&gt;
** We had contactless payment for beer! (And we also offered cashback.) We should have messaged that better. Contactless payment for other things is complex, as we don't really control them. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* forewarn food vendors to expect all-day demand, not just mealtimes, so they can stock and staff appropriately [+1]&lt;br /&gt;
** food vendors were pretty much *events* caterers, used to feeding people snacks/lunch, we need *festival* caterers who are used to feeding people who are staying for a number of days. thethalicafe.co.uk? bedouin tent (shambala)? +late night options [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
*** It's really difficult to get caterers. Now we're a bit better known it's getting easier. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* pinboard (offline) notice board everyone can contribute to (lost property, mini event notices eg rocket launches, would like to meet.., etc) [+1]&lt;br /&gt;
** This was supposed to be next to the info tent, but got lost in the last-minute panic. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Ask people who want to give workshops if they'd be happy to give more than one session - the blacksmiths' output was extreme, but even giving two or three sessions would greatly increase the % of attendees who could sign up.&lt;br /&gt;
** Many workshop submissions specified that already, the issue was actually with finding space for them as we only had one workshop tent. We'll have many next time! --[[User:Jonty|Jonty]]&lt;br /&gt;
* Sign-ups some kind of &amp;quot;express preference&amp;quot; systems, so most people (including those who don't check email regularly) can get at least one of their top choices, rather than first-come-first-served.&lt;br /&gt;
** Online workshop sign-up is a priority for next year. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Board games tent in the evenings [+4]&lt;br /&gt;
* Poker tent&lt;br /&gt;
* Be less ambitious with badge functionality [+3]&lt;br /&gt;
** And provide full documentation of features/functionality [+1]&lt;br /&gt;
** And sample code for each function&lt;br /&gt;
** Perhaps a back-to-basics through-hole design that comes with soldering iron, solder and instructions?&lt;br /&gt;
** I think we might build on this design for the next event. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
** Software that doesn't involve an OS (but rather more conventional Arduinoery) might be more easily hackable by others during/after the event? Especially given libraries for people to do amusing things with the peer-to-peer radio...&lt;br /&gt;
*** That is actually much harder to build anything decent with. The badges are normal arduinos and all the libraries are available, you don't have to use the EMF OS, it was designed for people to write normal Arduino code for! --[[User:Jonty|Jonty]]&lt;br /&gt;
* EMF is unlike other festivals - for a large number of people, carrying kit to/from car is impractical and security walking every car through site is time-consuming and volunteer-intensive (not to mention the fact that cars driving off site weren't walked off). Suggest that the parking area is directly next to and easily accessible from the camping area (e.g. just separated by hay bales to stop cars driving on to the camping area).&lt;br /&gt;
** As a village/car user you could generally provide your own security person walking in front of the car. This works 2 fold: 1) security doesn't need to walk for you 2) less waiting time for you since you already provide someone to walk.&lt;br /&gt;
** The plan for this was to allow people to drive onto site on the Thursday evening. It wasn't very well communicated and we had a *very* tight setup schedule so we needed to reduce this as much as possible. This is ultimately an issue with our setup schedule&lt;br /&gt;
** It wouldn't work on this site, but for some locations it might be possible to have a drop-off point close to camping (with a limited number of cars at one time), better idea than having cars (ignition source) close to tents. Some people were taking the mickey on Monday morning, many people driving onto site that could have carried things instead tying up volunteer resources to escort them.&lt;br /&gt;
* Provide job descriptions for traffic control, parking and entrance gatehouse. Instructions were handed from volunteer to volunteer by word of mouth and whilst common sense prevailed, it would have been useful to have instructions as to what to do under certain circumstances and a list of answers to FAQs, e.g.:&lt;br /&gt;
** What if somebody didn't have a parking ticket and wanted to park?&lt;br /&gt;
** What if somebody was just dropping off - where should they do this?&lt;br /&gt;
** What times were shuttle buses running?&lt;br /&gt;
** What times the gates were open/closed?&lt;br /&gt;
** Have a priority queue for people with machine readable tickets (ie paper!)&lt;br /&gt;
** Volunteer training was lost by the wayside for some roles, we'll fix that. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Add suggested age ranges for all workshops, some of the &amp;quot;adult&amp;quot; workshops were also very suitable for children (e.g. electronic fashion, solar pv) or could have been run once in main workshop once in kid's area [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** This was supposed to happen but got missed off by accident. Apologies. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Bolt the fence from the right side, I know we didn't even want it at all but local authorities can be fussy, I've been at a festival before who did the same and they made them fix it during the event.. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Want the good coffee on Monday morning, especially for drivers :) Maybe in the car park to help persuade people off site. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Would be good to have eggs, fresh milk, bacon at the shop (there was a comment like &amp;quot;we don't have eggs, they break too easily&amp;quot; - so charge extra to cover this, though it's probably not as bad as you think..) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** The shop was being run by an external team, we didn't control what they stocked. --[[User:Jonty|Jonty]]&lt;br /&gt;
** Morrisons did a tent with Milk, Bread, Burgers, BBQs etc @ http://www.festivalofcycling.org/expo/name/morrisons/, might be worth asking them? [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]])&lt;br /&gt;
* Start ticket sales (a couple of months?) earlier, maybe with a slightly bigger difference between early ticket prices and full price to encourage attendees to get in early (which in turn would improve cashflow) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]]) [+1]&lt;br /&gt;
* Start ticket sales *now* whilst you have all the publicity or at least have a page up where people can register to be emailed once the next event has tickets for sale.  That way you get your current mailing list + everyone else who has only just learned about it as your audience. [[User:Alteralias|Alteralias]]&lt;br /&gt;
** Until we have a date/venue that is not a great plan, as we'd end up with a lot of refunds. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Cluster the talks into related-topic sessions&lt;br /&gt;
** This is very difficult due to availability of speakers, and we'd rather people with very specific interests had talks to go to all weekend rather than just on one afternoon. --[[User:Jonty|Jonty]]&lt;br /&gt;
* Volunteering stuff ([[User:HughePaul|HughePaul]])&lt;br /&gt;
** Whiteboard in info tent for current issues / tasks, handover&lt;br /&gt;
** Have info tent next to security tent so both can be available at the same time and all the time.&lt;br /&gt;
*** The info tent and the gatehouse/security tent could be two sides of the same erection.&lt;br /&gt;
** have predefined named people in shifts for head of / coordination of volunteering (could also double as an info/security tent staff)&lt;br /&gt;
** maybe stream some talks in info tent so they don't feel like they are missing things&lt;br /&gt;
** more formal defined (and communicated) lost-property form and procedure&lt;br /&gt;
** define volunteer job roles to make handovers easier and so we know what we are meant to be doing&lt;br /&gt;
* Have dedicated blog / tweet / website updating person/team&lt;br /&gt;
* big screen with latest official event update tweets&lt;br /&gt;
** Very expensive to hire. --[[User:Jonty|Jonty]]&lt;br /&gt;
* info about getting DISconnected from DKs and leaving the site in vehicles&lt;br /&gt;
** This was badly handled, and we only realised when it was too late. --[[User:Jonty|Jonty]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3566</id>
		<title>Feedback</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3566"/>
		<updated>2014-09-04T13:30:53Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
Please let us know what went well and what didn't go well at EMF this year. We really do care about your feedback and we'll try and improve this for next time.&lt;br /&gt;
&lt;br /&gt;
Add your feedback below:&lt;br /&gt;
&lt;br /&gt;
== Good Stuff ==&lt;br /&gt;
&lt;br /&gt;
* Location&lt;br /&gt;
* Badges&lt;br /&gt;
* Variety of talks [+1]&lt;br /&gt;
* Showers [+∞]&lt;br /&gt;
* Hand washing facilities&lt;br /&gt;
** putting the showers (with hot water in handbasins) next to toilets v.good&lt;br /&gt;
* Parking&lt;br /&gt;
* Shuttle trailer to car park&lt;br /&gt;
** ... and shuttle to BLY railway station. Made coming by public transport a doddle.&lt;br /&gt;
* Power &amp;amp; data infrastructure - pretty much rock solid throughout! [+2]&lt;br /&gt;
* Speedy response of volunteers/organisers to problem resolution&lt;br /&gt;
* Service at the bar was good (while the drinks lasted), and it was very nice to have ''multiple'' indoor social spaces, esp for people who wanted a quieter lounge as well as louder bar.&lt;br /&gt;
** Being able to check beer availability on the till website was awesome!&lt;br /&gt;
* Floor panel roads [+4]&lt;br /&gt;
* String lights (cut through to showers was awesome!) [+1]&lt;br /&gt;
* Ability to hire tables/chairs/marquees/hay bales etc. - were all good quality, too. [+1]&lt;br /&gt;
* Kids workshops [+1]&lt;br /&gt;
* Arcade!&lt;br /&gt;
* Friendliness of other attendees&lt;br /&gt;
* First aid&lt;br /&gt;
* Shop - selling books of speakers was a really nice idea, and it was good to talk to speakers &amp;amp; do signing there afterwards.&lt;br /&gt;
* That spinning music installation.&lt;br /&gt;
* Lighting - I didn't have to turn my torch on at all, but it was still dark enough in my tent to sleep.&lt;br /&gt;
* Club Mate.&lt;br /&gt;
* Ring making workshop&lt;br /&gt;
* Lake was pretty&lt;br /&gt;
* Supportive atmosphere for speakers and very nice feedback afterwards&lt;br /&gt;
* Water: plentiful flow, tasty water, cool dispensers [+1]&lt;br /&gt;
** Hand soap by taps (udders?)&lt;br /&gt;
* Keeping toilet paper supplies topped up in all the toilets&lt;br /&gt;
* Nice choice of real ales and proper cider&lt;br /&gt;
* Lasershow + Chiptunes in Tent A&lt;br /&gt;
* Tschunk&lt;br /&gt;
* Everything that Dimitri brought along&lt;br /&gt;
* EMF CTF: Like getting lock pickers to cook your food, playing IRL replay,relay and pre-play attacks and memory corruption, sadly no real-life cross-site scripting :)&lt;br /&gt;
&lt;br /&gt;
== Stuff that could be improved ==&lt;br /&gt;
&lt;br /&gt;
* Buy more beer! [[User:Russ|Russ]] ([[User talk:Russ|talk]]) [+1]&lt;br /&gt;
** No firkins next time, kils only! --[[User:Sde|Sde]] ([[User talk:Sde|talk]])&lt;br /&gt;
* Toilets... 'nuff said!  [[User:AndyB|AndyB]] ([[User talk:AndyB|talk]]) [+2]&lt;br /&gt;
** Agreed - I've seen portakabins (like the shower blocks) that containing proper flushing loos. They're ''much'' less stinky and likely to block up than the portaloos we had, which didn't always seem willing to drop their loads into their collection tanks, leading to nastiness and health hazards (even without the pumping contractor being rubbish)&lt;br /&gt;
*** This was actually what we wanted, but they're tremendously expensive. Suggestions for vendors welcome!&lt;br /&gt;
** Additionally, LIGHTS in the toilets.  Having to use my phone / badge as a torch to see what was going on while i cleaned off the toilet before sitting down was particularly difficult. [[User:Thinkl33t|Thinkl33t]] ([[User talk:Thinkl33t|talk]]) 20:05, 1 September 2014 (UTC)&lt;br /&gt;
** thunderboxes2go.co.uk are good and know how to handle local authority problems, they have done shambala for 10+ years - high enough capacity to not need emptying during the event [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** Maybe ask Cambridge &amp;amp; District CAMRA who provided the toilets for Cambridge 41st beer festival - they had some fairly nice flushing toilets which came on a trailer, a bit like the posh wash showers. I think Jonty mentioned that a lot of providers were put off by the fact that we're a festival. Well, if these guys are ok with providing for a beer festival, they must be pretty brave! -[[User:Alecjw]]&lt;br /&gt;
** Definite vote for the trailer-style flushing toilets, with multiple cubicles (+sinks, lights and mirrors) on one tow-along trailer, just like the showers. I've seen these at MANY festivals - though, granted, usually only in 'posh' camping/press/VIP areas. Should be possible if you manage to convince the providers that we're not a rowdy bunch of drunken teenagers!&lt;br /&gt;
** A clue to the problem with the chemical toilets is in the name: no chemical sanitiser/deodoriser was used in any toilet I tried. Adding Elsan or similar to the toilets would probably have made them much more acceptable. [[User:PhilSwinbank|PhilSwinbank]] ([[User talk:PhilSwinbank|talk]]) 22:18, 3 September 2014 (UTC)&lt;br /&gt;
* Make sure that drinking water is clearly labelled as such&lt;br /&gt;
* More food and drink options&lt;br /&gt;
** Eg. non-caffeine / low or no sugar options&lt;br /&gt;
** Chips!&lt;br /&gt;
** Jacket potato vendor&lt;br /&gt;
** Healthy 'green' food&lt;br /&gt;
** also possibly going on later, a lot of the places shut up shop quite early.&lt;br /&gt;
** A late night vendor would be fantastic - doesn't have to be fancy food, but just something hot to eat after 9pm [+2]&lt;br /&gt;
* Survey positions of lanes/tents/DKs as early as possible before items arrive and mark out.--[[User:Sully|Sully]] ([[User talk:Sully|talk]]) 12:06, 1 September 2014 (UTC)&lt;br /&gt;
** This was planned but we were let down by the rather poor state of mobile GIS software. &lt;br /&gt;
*** there are multiple open source solutions for mapping, try https://umap.openstreetmap.fr/en/ or reach to out myself or #openstreetmap, there are many OSM'ers in the UK,  [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
* Similar to this, measure for fence panels and drop stillage appropriately, to avoid the need to carry loads of them right up the camping field by hand&lt;br /&gt;
* Make it longer! There was loads of cool stuff I didn't have change to check out :( After all that work everyone does, it was a shame I couldn't experience it all! ([[User:Chewie|Chewie]])&lt;br /&gt;
* Visibility of presentations in tents (brighter projectors/darker tents??) ([[User:StuartL]]) [+2]&lt;br /&gt;
* washing points over drains/soakaway so the ground doesn't get muddy ([[User:Chewie|Chewie]]) [+3]&lt;br /&gt;
* Mark out/allocate spaces for villages who had pinpointed locations on maps ([[User:Markp]]) [+1]&lt;br /&gt;
* Use more plasma screens in stages instead of projectors ([[User:Markp]]).  Or (better, as then the speaker can point to things) black fabric shades for the screen or marquee roof&lt;br /&gt;
* Improved arrangements for washing and washing up (and handling the waste water from that) [+1]&lt;br /&gt;
* Provide sanitizer gel dispensers at water points and near loos [+1]&lt;br /&gt;
* Have the schedule linked off the EMF main page&lt;br /&gt;
** It was, but not on the First day...we forgot! See &amp;quot;Programme&amp;quot; at the top of the main website.&lt;br /&gt;
* Distribute and display paper schedules (even if their might be some last-minute changes) [+2]&lt;br /&gt;
** Or have small screens at the entrances to tents showing what's currently on &amp;amp; what's next.&lt;br /&gt;
* Much more workshop activity (more hands-on electronics and physical making) [+5]&lt;br /&gt;
* Do have component vendors (maybe at their cost for marquee/power/space)&lt;br /&gt;
** This is very difficult without a clear list of what will sell, as CPC was arranged to appear but wanted advisement ([[User:Stanto]])&lt;br /&gt;
* Pick a flatter site (for ease of disabled access)&lt;br /&gt;
* Ask speakers for bio's to include with their abstracts.  Given them an abstract length up-front instead of editing it in an ad hoc way.  Confirm acceptance to speakers and workshop organisers earlier.&lt;br /&gt;
** Do this after talks have been accepted. I didn't write my talk so didn't know details until I got the OK.&lt;br /&gt;
* Make and enforce a clear music curfew (say from midnight or 1am or 2am to 8 or 9am or 10am), to defend those sleeping from (eg) the technoevangelists and the drunk [+4]&lt;br /&gt;
** Perhaps try to select a site next time where we can make part of the site to be a quiet area, eg a part surrounded by trees for natural sound insulation. Then enforce a noise curfew there. I'm not keen on the idea of having a noise curfew covering the entire camp though. [[User:Alecjw]] [+1]&lt;br /&gt;
** Seconding enforced quiet/family camping area, but no overall noise curfew. It didn't take long to get away from the worst noise, and the end of the field by the kids' area was incredibly quiet (though strangely empty!!)&lt;br /&gt;
* Loos not so near food vendors (pong + visible urinals offputting) [+5]&lt;br /&gt;
* stronger enforcement/signage of quiet camping area [+4]&lt;br /&gt;
* an explicit invitation (with clear instructions) to report Code of Conduct violations in open ceremony, brochure, Twitter, etc. We had no direct reports to Team Comfort, but several anecdotal tweets after the event -- when it's much too late. [[User:Martind|Martind]] ([[User talk:Martind|talk]]) 20:58, 1 September 2014 (UTC) [+1]&lt;br /&gt;
* quieter, less-enclosed and more spacious bar (I suffer from social anxiety when I'm closed in with crowds, so I had a very sober emf!).  [[User:Jane C|Jane C]]&lt;br /&gt;
** perhaps an outdoor seating area if a larger marquee is too costly.&lt;br /&gt;
* use our collective knowledge of technology to sort accessibility issues &lt;br /&gt;
**ring-fence money for things like closed-loop in the stages early on. &lt;br /&gt;
**ask people about their access requirements much earlier on - e.g. when they buy a ticket - so that there is more time to meet these requirements (or reach a workable compromise)&lt;br /&gt;
**Build some kind of working system for preventing able-bodied people from using the disabled loos and showers (radar keys that only work when the loo is empty?) [[User:Jane C|Jane C]]&lt;br /&gt;
* Info desk didn't seem to have the details wrt. volunteers, so when I volunteered I was sent out and found I wasn't needed.  Suggest splitting the job - having a volunteer team leader (or several, in shifts) whose job it is to know who is where and also to make sure nobody gets stuck on a gate for 12 hours (eg. rotating people to more interesting places every couple of hours). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
* Also similar to this, a register of 'on call' people - excess volunteers who can deal with sudden demands for people (esp. in the case of fire I can imagine this would be extremely useful - you'd potentially need to cordon off a largish area very quickly, and that takes people.  More mundane reasons would be a talk/workshop accumulating a large queue that needs managing). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
* add GPS or other location aware technology like BTLE/iBeacon to the badges for automatic now/next notifications [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
&lt;br /&gt;
==Suggestions==&lt;br /&gt;
* Ask for an optional email address for each ticket to go on your announce only mailing list.  Only the person that bought the tickets got your emails and they were slow to forward them on meaning most messages were received too late.&lt;br /&gt;
* Ask for age of children when booking, to give better planning stats for workshops etc. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* A talk (a bit like lightning talks) where people are given 5-10 minutes to share what they did with the previous event's badge. (If someone sends me the competition winners/runners up, I'll co-ordinate it) [[User:MatS|MatS]] ([[User talk:MatS|talk]]) 07:54, 1 September 2014 (UTC)&lt;br /&gt;
* Pre-paid accounts for spending money on food/beer/whatever to negate need for cash ([[User:Markp]])&lt;br /&gt;
* Have a fleet of communal wheel-barrows to help people transport their stuff from car to campsite [+1]&lt;br /&gt;
** Stepney City Farm have a fleet of broken wheelbarrows – fix ’em, use ’em, everybody wins! ([[User:Andylolz]])&lt;br /&gt;
** Or purchase some sack trolleys&lt;br /&gt;
* contactless payment gear for food, beer, workshops&lt;br /&gt;
** We had contactless payment for beer! (And we also offered cashback.) We should have messaged that better. Contactless payment for other things is complex, as we don't really control them. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* forewarn food vendors to expect all-day demand, not just mealtimes, so they can stock and staff appropriately [+1]&lt;br /&gt;
** food vendors were pretty much *events* caterers, used to feeding people snacks/lunch, we need *festival* caterers who are used to feeding people who are staying for a number of days. thethalicafe.co.uk? bedouin tent (shambala)? +late night options [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
*** It's really difficult to get caterers. Now we're a bit better known it's getting easier. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* pinboard (offline) notice board everyone can contribute to (lost property, mini event notices eg rocket launches, would like to meet.., etc) [+1]&lt;br /&gt;
* Ask people who want to give workshops if they'd be happy to give more than one session - the blacksmiths' output was extreme, but even giving two or three sessions would greatly increase the % of attendees who could sign up.&lt;br /&gt;
* Sign-ups some kind of &amp;quot;express preference&amp;quot; systems, so most people (including those who don't check email regularly) can get at least one of their top choices, rather than first-come-first-served.&lt;br /&gt;
* Board games tent in the evenings [+4]&lt;br /&gt;
* Poker tent&lt;br /&gt;
* Be less ambitious with badge functionality [+3]&lt;br /&gt;
** And provide full documentation of features/functionality [+1]&lt;br /&gt;
** And sample code for each function&lt;br /&gt;
** Perhaps a back-to-basics through-hole design that comes with soldering iron, solder and instructions?&lt;br /&gt;
** I think we might build on this design for the next event. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
** Software that doesn't involve an OS (but rather more conventional Arduinoery) might be more easily hackable by others during/after the event? Especially given libraries for people to do amusing things with the peer-to-peer radio...&lt;br /&gt;
* EMF is unlike other festivals - for a large number of people, carrying kit to/from car is impractical and security walking every car through site is time-consuming and volunteer-intensive (not to mention the fact that cars driving off site weren't walked off). Suggest that the parking area is directly next to and easily accessible from the camping area (e.g. just separated by hay bales to stop cars driving on to the camping area).&lt;br /&gt;
** As a village/car user you could generally provide your own security person walking in front of the car. This works 2 fold: 1) security doesn't need to walk for you 2) less waiting time for you since you already provide someone to walk.&lt;br /&gt;
** The plan for this was to allow people to drive onto site on the Thursday evening. It wasn't very well communicated and we had a *very* tight setup schedule so we needed to reduce this as much as possible. This is ultimately an issue with our setup schedule&lt;br /&gt;
** It wouldn't work on this site, but for some locations it might be possible to have a drop-off point close to camping (with a limited number of cars at one time), better idea than having cars (ignition source) close to tents. Some people were taking the mickey on Monday morning, many people driving onto site that could have carried things instead tying up volunteer resources to escort them.&lt;br /&gt;
* Provide job descriptions for traffic control, parking and entrance gatehouse. Instructions were handed from volunteer to volunteer by word of mouth and whilst common sense prevailed, it would have been useful to have instructions as to what to do under certain circumstances and a list of answers to FAQs, e.g.:&lt;br /&gt;
** What if somebody didn't have a parking ticket and wanted to park?&lt;br /&gt;
** What if somebody was just dropping off - where should they do this?&lt;br /&gt;
** What times were shuttle buses running?&lt;br /&gt;
** What times the gates were open/closed?&lt;br /&gt;
** Have a priority queue for people with machine readable tickets (ie paper!)&lt;br /&gt;
* Add suggested age ranges for all workshops, some of the &amp;quot;adult&amp;quot; workshops were also very suitable for children (e.g. electronic fashion, solar pv) or could have been run once in main workshop once in kid's area [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Bolt the fence from the right side, I know we didn't even want it at all but local authorities can be fussy, I've been at a festival before who did the same and they made them fix it during the event.. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Want the good coffee on Monday morning, especially for drivers :) Maybe in the car park to help persuade people off site. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Would be good to have eggs, fresh milk, bacon at the shop (there was a comment like &amp;quot;we don't have eggs, they break too easily&amp;quot; - so charge extra to cover this, though it's probably not as bad as you think..) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** Morrisons did a tent with Milk, Bread, Burgers, BBQs etc @ http://www.festivalofcycling.org/expo/name/morrisons/, might be worth asking them? [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]])&lt;br /&gt;
* Start ticket sales (a couple of months?) earlier, maybe with a slightly bigger difference between early ticket prices and full price to encourage attendees to get in early (which in turn would improve cashflow) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]]) [+1]&lt;br /&gt;
* Start ticket sales *now* whilst you have all the publicity or at least have a page up where people can register to be emailed once the next event has tickets for sale.  That way you get your current mailing list + everyone else who has only just learned about it as your audience. [[User:Alteralias|Alteralias]]&lt;br /&gt;
* Cluster the talks into related-topic sessions&lt;br /&gt;
* Volunteering stuff ([[User:HughePaul|HughePaul]])&lt;br /&gt;
** Whiteboard in info tent for current issues / tasks, handover&lt;br /&gt;
** Have info tent next to security tent so both can be available at the same time and all the time.&lt;br /&gt;
*** The info tent and the gatehouse/security tent could be two sides of the same erection.&lt;br /&gt;
** have predefined named people in shifts for head of / coordination of volunteering (could also double as an info/security tent staff)&lt;br /&gt;
** maybe stream some talks in info tent so they don't feel like they are missing things&lt;br /&gt;
** more formal defined (and communicated) lost-property form and procedure&lt;br /&gt;
** define volunteer job roles to make handovers easier and so we know what we are meant to be doing&lt;br /&gt;
* Have dedicated blog / tweet / website updating person/team&lt;br /&gt;
* big screen with latest official event update tweets&lt;br /&gt;
* info about getting DISconnected from DKs and leaving the site in vehicles&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3565</id>
		<title>Feedback</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Feedback&amp;diff=3565"/>
		<updated>2014-09-04T13:29:38Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Stuff that could be improved */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
Please let us know what went well and what didn't go well at EMF this year. We really do care about your feedback and we'll try and improve this for next time.&lt;br /&gt;
&lt;br /&gt;
Add your feedback below:&lt;br /&gt;
&lt;br /&gt;
== Good Stuff ==&lt;br /&gt;
&lt;br /&gt;
* Location&lt;br /&gt;
* Badges&lt;br /&gt;
* Variety of talks [+1]&lt;br /&gt;
* Showers [+∞]&lt;br /&gt;
* Hand washing facilities&lt;br /&gt;
** putting the showers (with hot water in handbasins) next to toilets v.good&lt;br /&gt;
* Parking&lt;br /&gt;
* Shuttle trailer to car park&lt;br /&gt;
** ... and shuttle to BLY railway station. Made coming by public transport a doddle.&lt;br /&gt;
* Power &amp;amp; data infrastructure - pretty much rock solid throughout! [+2]&lt;br /&gt;
* Speedy response of volunteers/organisers to problem resolution&lt;br /&gt;
* Service at the bar was good (while the drinks lasted), and it was very nice to have ''multiple'' indoor social spaces, esp for people who wanted a quieter lounge as well as louder bar.&lt;br /&gt;
** Being able to check beer availability on the till website was awesome!&lt;br /&gt;
* Floor panel roads [+4]&lt;br /&gt;
* String lights (cut through to showers was awesome!) [+1]&lt;br /&gt;
* Ability to hire tables/chairs/marquees/hay bales etc. - were all good quality, too. [+1]&lt;br /&gt;
* Kids workshops [+1]&lt;br /&gt;
* Arcade!&lt;br /&gt;
* Friendliness of other attendees&lt;br /&gt;
* First aid&lt;br /&gt;
* Shop - selling books of speakers was a really nice idea, and it was good to talk to speakers &amp;amp; do signing there afterwards.&lt;br /&gt;
* That spinning music installation.&lt;br /&gt;
* Lighting - I didn't have to turn my torch on at all, but it was still dark enough in my tent to sleep.&lt;br /&gt;
* Club Mate.&lt;br /&gt;
* Ring making workshop&lt;br /&gt;
* Lake was pretty&lt;br /&gt;
* Supportive atmosphere for speakers and very nice feedback afterwards&lt;br /&gt;
* Water: plentiful flow, tasty water, cool dispensers [+1]&lt;br /&gt;
** Hand soap by taps (udders?)&lt;br /&gt;
* Keeping toilet paper supplies topped up in all the toilets&lt;br /&gt;
* Nice choice of real ales and proper cider&lt;br /&gt;
* Lasershow + Chiptunes in Tent A&lt;br /&gt;
* Tschunk&lt;br /&gt;
* Everything that Dimitri brought along&lt;br /&gt;
* EMF CTF: Like getting lock pickers to cook your food, playing IRL replay,relay and pre-play attacks and memory corruption, sadly no real-life cross-site scripting :)&lt;br /&gt;
&lt;br /&gt;
== Stuff that could be improved ==&lt;br /&gt;
&lt;br /&gt;
* Buy more beer! [[User:Russ|Russ]] ([[User talk:Russ|talk]]) [+1]&lt;br /&gt;
** No firkins next time, kils only! --[[User:Sde|Sde]] ([[User talk:Sde|talk]])&lt;br /&gt;
* Toilets... 'nuff said!  [[User:AndyB|AndyB]] ([[User talk:AndyB|talk]]) [+2]&lt;br /&gt;
** Agreed - I've seen portakabins (like the shower blocks) that containing proper flushing loos. They're ''much'' less stinky and likely to block up than the portaloos we had, which didn't always seem willing to drop their loads into their collection tanks, leading to nastiness and health hazards (even without the pumping contractor being rubbish)&lt;br /&gt;
*** This was actually what we wanted, but they're tremendously expensive. Suggestions for vendors welcome!&lt;br /&gt;
** Additionally, LIGHTS in the toilets.  Having to use my phone / badge as a torch to see what was going on while i cleaned off the toilet before sitting down was particularly difficult. [[User:Thinkl33t|Thinkl33t]] ([[User talk:Thinkl33t|talk]]) 20:05, 1 September 2014 (UTC)&lt;br /&gt;
** thunderboxes2go.co.uk are good and know how to handle local authority problems, they have done shambala for 10+ years - high enough capacity to not need emptying during the event [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** Maybe ask Cambridge &amp;amp; District CAMRA who provided the toilets for Cambridge 41st beer festival - they had some fairly nice flushing toilets which came on a trailer, a bit like the posh wash showers. I think Jonty mentioned that a lot of providers were put off by the fact that we're a festival. Well, if these guys are ok with providing for a beer festival, they must be pretty brave! -[[User:Alecjw]]&lt;br /&gt;
** Definite vote for the trailer-style flushing toilets, with multiple cubicles (+sinks, lights and mirrors) on one tow-along trailer, just like the showers. I've seen these at MANY festivals - though, granted, usually only in 'posh' camping/press/VIP areas. Should be possible if you manage to convince the providers that we're not a rowdy bunch of drunken teenagers!&lt;br /&gt;
** A clue to the problem with the chemical toilets is in the name: no chemical sanitiser/deodoriser was used in any toilet I tried. Adding Elsan or similar to the toilets would probably have made them much more acceptable. [[User:PhilSwinbank|PhilSwinbank]] ([[User talk:PhilSwinbank|talk]]) 22:18, 3 September 2014 (UTC)&lt;br /&gt;
* Make sure that drinking water is clearly labelled as such&lt;br /&gt;
* More food and drink options&lt;br /&gt;
** Eg. non-caffeine / low or no sugar options&lt;br /&gt;
** Chips!&lt;br /&gt;
** Jacket potato vendor&lt;br /&gt;
** Healthy 'green' food&lt;br /&gt;
** also possibly going on later, a lot of the places shut up shop quite early.&lt;br /&gt;
** A late night vendor would be fantastic - doesn't have to be fancy food, but just something hot to eat after 9pm [+2]&lt;br /&gt;
* Survey positions of lanes/tents/DKs as early as possible before items arrive and mark out.--[[User:Sully|Sully]] ([[User talk:Sully|talk]]) 12:06, 1 September 2014 (UTC)&lt;br /&gt;
** This was planned but we were let down by the rather poor state of mobile GIS software. &lt;br /&gt;
*** there are multiple open source solutions for mapping, try https://umap.openstreetmap.fr/en/ or reach to out myself or #openstreetmap, there are many OSM'ers in the UK,  [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
* Similar to this, measure for fence panels and drop stillage appropriately, to avoid the need to carry loads of them right up the camping field by hand&lt;br /&gt;
* Make it longer! There was loads of cool stuff I didn't have change to check out :( After all that work everyone does, it was a shame I couldn't experience it all! ([[User:Chewie|Chewie]])&lt;br /&gt;
* Visibility of presentations in tents (brighter projectors/darker tents??) ([[User:StuartL]]) [+2]&lt;br /&gt;
* washing points over drains/soakaway so the ground doesn't get muddy ([[User:Chewie|Chewie]]) [+3]&lt;br /&gt;
* Mark out/allocate spaces for villages who had pinpointed locations on maps ([[User:Markp]]) [+1]&lt;br /&gt;
* Use more plasma screens in stages instead of projectors ([[User:Markp]]).  Or (better, as then the speaker can point to things) black fabric shades for the screen or marquee roof&lt;br /&gt;
* Improved arrangements for washing and washing up (and handling the waste water from that) [+1]&lt;br /&gt;
* Provide sanitizer gel dispensers at water points and near loos [+1]&lt;br /&gt;
* Have the schedule linked off the EMF main page&lt;br /&gt;
* Distribute and display paper schedules (even if their might be some last-minute changes) [+2]&lt;br /&gt;
** Or have small screens at the entrances to tents showing what's currently on &amp;amp; what's next.&lt;br /&gt;
* Much more workshop activity (more hands-on electronics and physical making) [+5]&lt;br /&gt;
* Do have component vendors (maybe at their cost for marquee/power/space)&lt;br /&gt;
** This is very difficult without a clear list of what will sell, as CPC was arranged to appear but wanted advisement ([[User:Stanto]])&lt;br /&gt;
* Pick a flatter site (for ease of disabled access)&lt;br /&gt;
* Ask speakers for bio's to include with their abstracts.  Given them an abstract length up-front instead of editing it in an ad hoc way.  Confirm acceptance to speakers and workshop organisers earlier.&lt;br /&gt;
** Do this after talks have been accepted. I didn't write my talk so didn't know details until I got the OK.&lt;br /&gt;
* Make and enforce a clear music curfew (say from midnight or 1am or 2am to 8 or 9am or 10am), to defend those sleeping from (eg) the technoevangelists and the drunk [+4]&lt;br /&gt;
** Perhaps try to select a site next time where we can make part of the site to be a quiet area, eg a part surrounded by trees for natural sound insulation. Then enforce a noise curfew there. I'm not keen on the idea of having a noise curfew covering the entire camp though. [[User:Alecjw]] [+1]&lt;br /&gt;
** Seconding enforced quiet/family camping area, but no overall noise curfew. It didn't take long to get away from the worst noise, and the end of the field by the kids' area was incredibly quiet (though strangely empty!!)&lt;br /&gt;
* Loos not so near food vendors (pong + visible urinals offputting) [+5]&lt;br /&gt;
* stronger enforcement/signage of quiet camping area [+4]&lt;br /&gt;
* an explicit invitation (with clear instructions) to report Code of Conduct violations in open ceremony, brochure, Twitter, etc. We had no direct reports to Team Comfort, but several anecdotal tweets after the event -- when it's much too late. [[User:Martind|Martind]] ([[User talk:Martind|talk]]) 20:58, 1 September 2014 (UTC) [+1]&lt;br /&gt;
* quieter, less-enclosed and more spacious bar (I suffer from social anxiety when I'm closed in with crowds, so I had a very sober emf!).  [[User:Jane C|Jane C]]&lt;br /&gt;
** perhaps an outdoor seating area if a larger marquee is too costly.&lt;br /&gt;
* use our collective knowledge of technology to sort accessibility issues &lt;br /&gt;
**ring-fence money for things like closed-loop in the stages early on. &lt;br /&gt;
**ask people about their access requirements much earlier on - e.g. when they buy a ticket - so that there is more time to meet these requirements (or reach a workable compromise)&lt;br /&gt;
**Build some kind of working system for preventing able-bodied people from using the disabled loos and showers (radar keys that only work when the loo is empty?) [[User:Jane C|Jane C]]&lt;br /&gt;
* Info desk didn't seem to have the details wrt. volunteers, so when I volunteered I was sent out and found I wasn't needed.  Suggest splitting the job - having a volunteer team leader (or several, in shifts) whose job it is to know who is where and also to make sure nobody gets stuck on a gate for 12 hours (eg. rotating people to more interesting places every couple of hours). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
* Also similar to this, a register of 'on call' people - excess volunteers who can deal with sudden demands for people (esp. in the case of fire I can imagine this would be extremely useful - you'd potentially need to cordon off a largish area very quickly, and that takes people.  More mundane reasons would be a talk/workshop accumulating a large queue that needs managing). ([[User:TonyHoyle|TonyHoyle]])&lt;br /&gt;
* add GPS or other location aware technology like BTLE/iBeacon to the badges for automatic now/next notifications [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]]).&lt;br /&gt;
&lt;br /&gt;
==Suggestions==&lt;br /&gt;
* Ask for an optional email address for each ticket to go on your announce only mailing list.  Only the person that bought the tickets got your emails and they were slow to forward them on meaning most messages were received too late.&lt;br /&gt;
* Ask for age of children when booking, to give better planning stats for workshops etc. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* A talk (a bit like lightning talks) where people are given 5-10 minutes to share what they did with the previous event's badge. (If someone sends me the competition winners/runners up, I'll co-ordinate it) [[User:MatS|MatS]] ([[User talk:MatS|talk]]) 07:54, 1 September 2014 (UTC)&lt;br /&gt;
* Pre-paid accounts for spending money on food/beer/whatever to negate need for cash ([[User:Markp]])&lt;br /&gt;
* Have a fleet of communal wheel-barrows to help people transport their stuff from car to campsite [+1]&lt;br /&gt;
** Stepney City Farm have a fleet of broken wheelbarrows – fix ’em, use ’em, everybody wins! ([[User:Andylolz]])&lt;br /&gt;
** Or purchase some sack trolleys&lt;br /&gt;
* contactless payment gear for food, beer, workshops&lt;br /&gt;
** We had contactless payment for beer! (And we also offered cashback.) We should have messaged that better. Contactless payment for other things is complex, as we don't really control them. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* forewarn food vendors to expect all-day demand, not just mealtimes, so they can stock and staff appropriately [+1]&lt;br /&gt;
** food vendors were pretty much *events* caterers, used to feeding people snacks/lunch, we need *festival* caterers who are used to feeding people who are staying for a number of days. thethalicafe.co.uk? bedouin tent (shambala)? +late night options [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
*** It's really difficult to get caterers. Now we're a bit better known it's getting easier. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
* pinboard (offline) notice board everyone can contribute to (lost property, mini event notices eg rocket launches, would like to meet.., etc) [+1]&lt;br /&gt;
* Ask people who want to give workshops if they'd be happy to give more than one session - the blacksmiths' output was extreme, but even giving two or three sessions would greatly increase the % of attendees who could sign up.&lt;br /&gt;
* Sign-ups some kind of &amp;quot;express preference&amp;quot; systems, so most people (including those who don't check email regularly) can get at least one of their top choices, rather than first-come-first-served.&lt;br /&gt;
* Board games tent in the evenings [+4]&lt;br /&gt;
* Poker tent&lt;br /&gt;
* Be less ambitious with badge functionality [+3]&lt;br /&gt;
** And provide full documentation of features/functionality [+1]&lt;br /&gt;
** And sample code for each function&lt;br /&gt;
** Perhaps a back-to-basics through-hole design that comes with soldering iron, solder and instructions?&lt;br /&gt;
** I think we might build on this design for the next event. [[User:Russ|Russ]] ([[User talk:Russ|talk]])&lt;br /&gt;
** Software that doesn't involve an OS (but rather more conventional Arduinoery) might be more easily hackable by others during/after the event? Especially given libraries for people to do amusing things with the peer-to-peer radio...&lt;br /&gt;
* EMF is unlike other festivals - for a large number of people, carrying kit to/from car is impractical and security walking every car through site is time-consuming and volunteer-intensive (not to mention the fact that cars driving off site weren't walked off). Suggest that the parking area is directly next to and easily accessible from the camping area (e.g. just separated by hay bales to stop cars driving on to the camping area).&lt;br /&gt;
** As a village/car user you could generally provide your own security person walking in front of the car. This works 2 fold: 1) security doesn't need to walk for you 2) less waiting time for you since you already provide someone to walk.&lt;br /&gt;
** The plan for this was to allow people to drive onto site on the Thursday evening. It wasn't very well communicated and we had a *very* tight setup schedule so we needed to reduce this as much as possible. This is ultimately an issue with our setup schedule&lt;br /&gt;
** It wouldn't work on this site, but for some locations it might be possible to have a drop-off point close to camping (with a limited number of cars at one time), better idea than having cars (ignition source) close to tents. Some people were taking the mickey on Monday morning, many people driving onto site that could have carried things instead tying up volunteer resources to escort them.&lt;br /&gt;
* Provide job descriptions for traffic control, parking and entrance gatehouse. Instructions were handed from volunteer to volunteer by word of mouth and whilst common sense prevailed, it would have been useful to have instructions as to what to do under certain circumstances and a list of answers to FAQs, e.g.:&lt;br /&gt;
** What if somebody didn't have a parking ticket and wanted to park?&lt;br /&gt;
** What if somebody was just dropping off - where should they do this?&lt;br /&gt;
** What times were shuttle buses running?&lt;br /&gt;
** What times the gates were open/closed?&lt;br /&gt;
** Have a priority queue for people with machine readable tickets (ie paper!)&lt;br /&gt;
* Add suggested age ranges for all workshops, some of the &amp;quot;adult&amp;quot; workshops were also very suitable for children (e.g. electronic fashion, solar pv) or could have been run once in main workshop once in kid's area [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Bolt the fence from the right side, I know we didn't even want it at all but local authorities can be fussy, I've been at a festival before who did the same and they made them fix it during the event.. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Want the good coffee on Monday morning, especially for drivers :) Maybe in the car park to help persuade people off site. [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
* Would be good to have eggs, fresh milk, bacon at the shop (there was a comment like &amp;quot;we don't have eggs, they break too easily&amp;quot; - so charge extra to cover this, though it's probably not as bad as you think..) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]])&lt;br /&gt;
** Morrisons did a tent with Milk, Bread, Burgers, BBQs etc @ http://www.festivalofcycling.org/expo/name/morrisons/, might be worth asking them? [[User:Jburgess777|Jburgess777]] ([[User talk:Jburgess777|talk]])&lt;br /&gt;
* Start ticket sales (a couple of months?) earlier, maybe with a slightly bigger difference between early ticket prices and full price to encourage attendees to get in early (which in turn would improve cashflow) [[User:Sthen|Sthen]] ([[User talk:Sthen|talk]]) [+1]&lt;br /&gt;
* Start ticket sales *now* whilst you have all the publicity or at least have a page up where people can register to be emailed once the next event has tickets for sale.  That way you get your current mailing list + everyone else who has only just learned about it as your audience. [[User:Alteralias|Alteralias]]&lt;br /&gt;
* Cluster the talks into related-topic sessions&lt;br /&gt;
* Volunteering stuff ([[User:HughePaul|HughePaul]])&lt;br /&gt;
** Whiteboard in info tent for current issues / tasks, handover&lt;br /&gt;
** Have info tent next to security tent so both can be available at the same time and all the time.&lt;br /&gt;
*** The info tent and the gatehouse/security tent could be two sides of the same erection.&lt;br /&gt;
** have predefined named people in shifts for head of / coordination of volunteering (could also double as an info/security tent staff)&lt;br /&gt;
** maybe stream some talks in info tent so they don't feel like they are missing things&lt;br /&gt;
** more formal defined (and communicated) lost-property form and procedure&lt;br /&gt;
** define volunteer job roles to make handovers easier and so we know what we are meant to be doing&lt;br /&gt;
* Have dedicated blog / tweet / website updating person/team&lt;br /&gt;
* big screen with latest official event update tweets&lt;br /&gt;
* info about getting DISconnected from DKs and leaving the site in vehicles&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Packing_List&amp;diff=2869</id>
		<title>Packing List</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Packing_List&amp;diff=2869"/>
		<updated>2014-08-24T11:46:38Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Optional */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example packing list and some optional things you might want to think about bringing:&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
Basic stuff you will almost certainly need:&lt;br /&gt;
&lt;br /&gt;
* Somewhere to sleep: tent (make sure you have all the bits), camper van, covered hammock etc&lt;br /&gt;
* Sleeping bag / blanket and air mattress / camp bed if you don't want to sleep on hard ground&lt;br /&gt;
* Enough (appropriate) clothing for the weekend including:&lt;br /&gt;
* Sunglasses / hat / sunscreen if it looks to be remotely warm&lt;br /&gt;
* Waterproof jacket / trousers / jumpers if it looks to be remotely cold &lt;br /&gt;
* Torch, with enough batteries for the weekend (consider having torch with rechargeable battery)&lt;br /&gt;
* Wash stuff: soap, flannel, toothbrush, toothpaste, shampoo&lt;br /&gt;
* Towel&lt;br /&gt;
* Toilet paper&lt;br /&gt;
* First aid kit&lt;br /&gt;
* Any medication you need&lt;br /&gt;
* Insect repellent&lt;br /&gt;
* Water bottle&lt;br /&gt;
* Carrier bags for dirty or wet clothes&lt;br /&gt;
* Chargers for anything battery powered you bring&lt;br /&gt;
* Bin bags for your [[Team:Sanitation#Rubbish_.26_Recycling|Rubbish]]&lt;br /&gt;
&lt;br /&gt;
==Cooking==&lt;br /&gt;
&lt;br /&gt;
There will be multiple caterers on the site, so you won't have to cook if you don't want to, but if you plan on cooking things on site:&lt;br /&gt;
&lt;br /&gt;
* Something to cook on: gas / meths burner, BBQ, raised fire (See FAQ for rules re. fires, NB there will be communal BBQs available)&lt;br /&gt;
* Fuel for above&lt;br /&gt;
* Something to ignite above: matches, lighter etc.&lt;br /&gt;
* Pots, pans, crockery and cutlery, cups etc.&lt;br /&gt;
* Washing up liquid &lt;br /&gt;
&lt;br /&gt;
==Optional==&lt;br /&gt;
&lt;br /&gt;
Some optional stuff you might want to think about bringing:&lt;br /&gt;
&lt;br /&gt;
* A computer - some of the workshops require a laptop, and we have all kinds of things online&lt;br /&gt;
* If you want power to your tent, 25m mains extension cable (with a UK 13A or 16A ceeform plug)&lt;br /&gt;
* A chair, or something else to sit on&lt;br /&gt;
* Something to carry/store water for cooking &amp;amp; drinking&lt;br /&gt;
* Pocket knife&lt;br /&gt;
* Spare socks (for sleeping in if it's cold)&lt;br /&gt;
* Ear plugs&lt;br /&gt;
* Rope&lt;br /&gt;
* Duct tape&lt;br /&gt;
* Long (30 - 40m) cat5 ethernet cable to connect your tent&lt;br /&gt;
* Short (2 - 5m) cat5 ethernet cable to use when in venues&lt;br /&gt;
* An old mobile phone if you wish to connect to our on-site phone network. Must take a standard SIM card.&lt;br /&gt;
&lt;br /&gt;
==What not to bring==&lt;br /&gt;
&lt;br /&gt;
* Try to avoid bringing glass. Glass is heavy, and broken glass is a pain to clean up in a field.&lt;br /&gt;
* Wireless access points. We'll have good WiFi; any other access points will just interfere.&lt;br /&gt;
* Beer or wine: we will have plenty and we'll be selling it at better-than-pub prices, with all the profits going towards the next camp. (We won't be selling spirits, so feel free to bring those.)&lt;br /&gt;
* Animals (except registered guide dogs).&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Packing_List&amp;diff=2868</id>
		<title>Packing List</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Packing_List&amp;diff=2868"/>
		<updated>2014-08-24T11:46:14Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Optional */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example packing list and some optional things you might want to think about bringing:&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
Basic stuff you will almost certainly need:&lt;br /&gt;
&lt;br /&gt;
* Somewhere to sleep: tent (make sure you have all the bits), camper van, covered hammock etc&lt;br /&gt;
* Sleeping bag / blanket and air mattress / camp bed if you don't want to sleep on hard ground&lt;br /&gt;
* Enough (appropriate) clothing for the weekend including:&lt;br /&gt;
* Sunglasses / hat / sunscreen if it looks to be remotely warm&lt;br /&gt;
* Waterproof jacket / trousers / jumpers if it looks to be remotely cold &lt;br /&gt;
* Torch, with enough batteries for the weekend (consider having torch with rechargeable battery)&lt;br /&gt;
* Wash stuff: soap, flannel, toothbrush, toothpaste, shampoo&lt;br /&gt;
* Towel&lt;br /&gt;
* Toilet paper&lt;br /&gt;
* First aid kit&lt;br /&gt;
* Any medication you need&lt;br /&gt;
* Insect repellent&lt;br /&gt;
* Water bottle&lt;br /&gt;
* Carrier bags for dirty or wet clothes&lt;br /&gt;
* Chargers for anything battery powered you bring&lt;br /&gt;
* Bin bags for your [[Team:Sanitation#Rubbish_.26_Recycling|Rubbish]]&lt;br /&gt;
&lt;br /&gt;
==Cooking==&lt;br /&gt;
&lt;br /&gt;
There will be multiple caterers on the site, so you won't have to cook if you don't want to, but if you plan on cooking things on site:&lt;br /&gt;
&lt;br /&gt;
* Something to cook on: gas / meths burner, BBQ, raised fire (See FAQ for rules re. fires, NB there will be communal BBQs available)&lt;br /&gt;
* Fuel for above&lt;br /&gt;
* Something to ignite above: matches, lighter etc.&lt;br /&gt;
* Pots, pans, crockery and cutlery, cups etc.&lt;br /&gt;
* Washing up liquid &lt;br /&gt;
&lt;br /&gt;
==Optional==&lt;br /&gt;
&lt;br /&gt;
Some optional stuff you might want to think about bringing:&lt;br /&gt;
&lt;br /&gt;
* A computer - some of the workshops require a laptop, and we have all kinds of things online&lt;br /&gt;
* A chair, or something else to sit on&lt;br /&gt;
* Something to carry/store water for cooking &amp;amp; drinking&lt;br /&gt;
* Pocket knife&lt;br /&gt;
* Spare socks (for sleeping in if it's cold)&lt;br /&gt;
* Ear plugs&lt;br /&gt;
* Rope&lt;br /&gt;
* Duct tape&lt;br /&gt;
* Long (30 - 40m) cat5 ethernet cable to connect your tent&lt;br /&gt;
* Short (2 - 5m) cat5 ethernet cable to use when in venues&lt;br /&gt;
* If you want power to your tent, 25m mains extension cable (with a UK 13A or 16A ceeform plug)&lt;br /&gt;
* An old mobile phone if you wish to connect to our on-site phone network. Must take a standard SIM card.&lt;br /&gt;
&lt;br /&gt;
==What not to bring==&lt;br /&gt;
&lt;br /&gt;
* Try to avoid bringing glass. Glass is heavy, and broken glass is a pain to clean up in a field.&lt;br /&gt;
* Wireless access points. We'll have good WiFi; any other access points will just interfere.&lt;br /&gt;
* Beer or wine: we will have plenty and we'll be selling it at better-than-pub prices, with all the profits going towards the next camp. (We won't be selling spirits, so feel free to bring those.)&lt;br /&gt;
* Animals (except registered guide dogs).&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2771</id>
		<title>EMF Milliways Dome Pledge</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2771"/>
		<updated>2014-08-22T15:07:29Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At every hacker/maker camp in europe you'll find Milliways, the restaurant at the end of the universe. Or in our case the end of the field.&lt;br /&gt;
&lt;br /&gt;
Milliways are a volunteer run kitchen who tour around the camps cooking for anybody who wants food in return for donations. They have a full kitchen and even bake bread in the middle of the camp! This year Milliways are helping EMF by providing food and cooking equipment to all our set-up and tear-down volunteers, as well as reprising their usual role as a fun place to hang out and get fed. In return, EMF is providing a large marquee for them.&lt;br /&gt;
&lt;br /&gt;
Milliways have an AWESOME giant geodesic dome they bring to the camps to use as shelter - both for people eating, and for people to relax under in the evening. They're bringing it over from Germany but it costs a lot of money to do so. We'd really like to help them out but the EMF budget is totally exhausted, so we're having a whip-round to try and raise a bit more money.&lt;br /&gt;
&lt;br /&gt;
If you'd like to sit under a massive geodesic dome and drink beer next weekend, please donate a little money to the cause.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Plan:''' Try and raise some money to help cover Milliways costs bringing over a huge geodesic dome&lt;br /&gt;
&lt;br /&gt;
'''Costings:''' They're already paying for it, but we'd like to raise £500 to help them out&lt;br /&gt;
&lt;br /&gt;
'''Pledges''' (please edit to add your support)&lt;br /&gt;
* £25 - Jontyw&lt;br /&gt;
* £20 - Jane C&lt;br /&gt;
* £5 - --[[User:Msemtd|Msemtd]] ([[User talk:Msemtd|talk]]) 14:53, 22 August 2014 (UTC)&lt;br /&gt;
* £50 - [[User:Ms7821|Mark]]&lt;br /&gt;
* £20 - [[User:ens|ens]]&lt;br /&gt;
* £30 - Crypt&lt;br /&gt;
&lt;br /&gt;
'''Total: £150'''&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2768</id>
		<title>EMF Milliways Dome Pledge</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2768"/>
		<updated>2014-08-22T14:59:45Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At every hacker/maker camp in europe you'll find Milliways, the restaurant at the end of the universe. Or in our case the end of the field.&lt;br /&gt;
&lt;br /&gt;
Milliways are a volunteer run kitchen who tour around the camps cooking for anybody who wants food in return for donations. They have a full kitchen and even bake bread in the middle of the camp! This year Milliways are helping EMF by providing food and cooking equipment to all our set-up and tear-down volunteers, as well as reprising their usual role as a fun place to hang out and get fed. In return, EMF is providing a large marquee for them.&lt;br /&gt;
&lt;br /&gt;
Milliways have an AWESOME giant geodesic dome they bring to the camps to use as shelter - both for people eating, and for people to relax under in the evening. They're bringing it over from Germany but it costs a lot of money to do so. We'd really like to help them out but the EMF budget is totally exhausted, so we're having a whip-round to try and raise a bit more money.&lt;br /&gt;
&lt;br /&gt;
If you'd like to sit under a massive geodesic dome and drink beer next weekend, please donate a little money to the cause.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Plan:''' Try and raise some money to help cover Milliways costs bringing over a huge geodesic dome&lt;br /&gt;
&lt;br /&gt;
'''Costings:''' They're already paying for it, but we'd like to raise £500 to help them out&lt;br /&gt;
&lt;br /&gt;
'''Pledges''' (please edit to add your support)&lt;br /&gt;
* £25 - Jontyw&lt;br /&gt;
* £20 - Jane C&lt;br /&gt;
* £5 - --[[User:Msemtd|Msemtd]] ([[User talk:Msemtd|talk]]) 14:53, 22 August 2014 (UTC)&lt;br /&gt;
* £50 - [[User:Ms7821|Mark]]&lt;br /&gt;
&lt;br /&gt;
'''Total: £100'''&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2767</id>
		<title>EMF Milliways Dome Pledge</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2767"/>
		<updated>2014-08-22T14:59:34Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At every hacker/maker camp in europe you'll find Milliways, the restaurant at the end of the universe. Or in our case the end of the field.&lt;br /&gt;
&lt;br /&gt;
Milliways are a volunteer run kitchen who tour around the camps cooking for anybody who wants food in return for donations. They have a full kitchen and even bake bread in the middle of the camp! This year Milliways are helping EMF by providing food and cooking equipment to all our set-up and tear-down volunteers, as well as reprising their usual role as a fun place to hang out and get fed. In return, EMF is providing a large marquee for them.&lt;br /&gt;
&lt;br /&gt;
Milliways have an AWESOME giant geodesic dome they bring to the camps to use as shelter - both for people eating, and for people to relax under in the evening. They're bringing it over from Germany but it costs a lot of money to do so. We'd really like to help them out but the EMF budget is totally exhausted, so we're having a whip-round to try and raise a bit more money.&lt;br /&gt;
&lt;br /&gt;
If you'd like to sit under a massive geodesic dome and drink beer next weekend, please donate a little money to the cause.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Plan:''' Try and raise some money to help cover Milliways costs bringing over a huge geodesic dome&lt;br /&gt;
&lt;br /&gt;
'''Costings:''' They're already paying for it, but we'd like to raise £500 to help them out&lt;br /&gt;
&lt;br /&gt;
'''Pledges''' (please edit to add your support)&lt;br /&gt;
* £25 - Jontyw&lt;br /&gt;
* £20 - Jane C&lt;br /&gt;
* £5 - --[[User:Msemtd|Msemtd]] ([[User talk:Msemtd|talk]]) 14:53, 22 August 2014 (UTC)&lt;br /&gt;
* £50 - [[User:Ms7821|Mark]]&lt;br /&gt;
&lt;br /&gt;
'''Total: £50'''&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2761</id>
		<title>EMF Milliways Dome Pledge</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=EMF_Milliways_Dome_Pledge&amp;diff=2761"/>
		<updated>2014-08-22T14:48:59Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Created page with &amp;quot;At every hacker/maker camp in europe you'll find Milliways, the restaurant at the end of the universe. Or in our case the end of the field.  Milliways are a volunteer run kitc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At every hacker/maker camp in europe you'll find Milliways, the restaurant at the end of the universe. Or in our case the end of the field.&lt;br /&gt;
&lt;br /&gt;
Milliways are a volunteer run kitchen who tour around the camps cooking for anybody who wants food in return for donations. They have a full kitchen and even bake bread in the middle of the camp! This year Milliways are helping EMF by providing food and cooking equipment to all our set-up and tear-down volunteers, as well as reprising their usual role as a fun place to hang out and get fed. In return, EMF is providing a large marquee for them.&lt;br /&gt;
&lt;br /&gt;
Milliways have an AWESOME giant geodesic dome they bring to the camps to use as shelter - both for people eating, and for people to relax under in the evening. They're bringing it over from Germany but it costs a lot of money to do so. We'd really like to help them out but the EMF budget is totally exhausted, so we're having a whip-round to try and raise a bit more money.&lt;br /&gt;
&lt;br /&gt;
If you'd like to sit under a massive geodesic dome and drink beer next weekend, please donate a little money to the cause.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Plan:''' Try and raise some money to help cover Milliways costs bringing over a huge geodesic dome&lt;br /&gt;
&lt;br /&gt;
'''Costings:''' They're already paying for it, but we'd like to raise £500 to help them out&lt;br /&gt;
&lt;br /&gt;
'''Pledges''' (please edit to add your support)&lt;br /&gt;
* £25 - Jontyw&lt;br /&gt;
&lt;br /&gt;
'''Total: £25'''&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Whiskyleaks&amp;diff=2645</id>
		<title>Whiskyleaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Whiskyleaks&amp;diff=2645"/>
		<updated>2014-08-21T21:39:59Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Carrying on [https://ohm2013.org/wiki/Whiskyleaks the tradition]. Bring a bottle (or more) of nice whisky. You might just be able to get away with whiskey.&lt;br /&gt;
&lt;br /&gt;
When: Saturday August 30th at 21:30&amp;lt;br&amp;gt;&lt;br /&gt;
Where: TBC  (probably [[Villages:London Hackspace]] or Milliways)&lt;br /&gt;
&lt;br /&gt;
If you're coming, add your name and what you're bringing:&lt;br /&gt;
&lt;br /&gt;
* [[User:Russ|Russ]] (something from SMWS)&lt;br /&gt;
* [[User:Jonty|Jonty]] (something from SMWS)&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=FAQ&amp;diff=2059</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=FAQ&amp;diff=2059"/>
		<updated>2014-08-18T15:27:27Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Can I make a fire, or bring my own BBQ? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
This is a work in progress. Keep checking for updates.&lt;br /&gt;
&lt;br /&gt;
==General==&lt;br /&gt;
===Who are you?===&lt;br /&gt;
Electromagnetic Field is run by a non-profit organisation and produced entirely by volunteers. We are members of well-known hackerspaces and other organisations. Get in touch if you want to join us in making this happen.&lt;br /&gt;
&lt;br /&gt;
===Why are you doing this?===&lt;br /&gt;
There now are dozens of hackerspaces and makerspaces in the UK and across Europe, and countless other communities of craftsmen, artists, designers, engineers who are interested in the same DIY ethic; but they have few opportunities to all meet up. Most events catering to these communities are small regional conferences and often focused on very specific themes.&lt;br /&gt;
&lt;br /&gt;
We want to change that :)&lt;br /&gt;
&lt;br /&gt;
===Why Milton Keynes?===&lt;br /&gt;
We looked at a fair number of candidate sites. The site we ended up with was the best candidate for a number of reasons:&lt;br /&gt;
* It comes at a comparably low price (some of the candidate sites we looked at asked for tens of thousands of £££.)&lt;br /&gt;
* It has great transport links to much of the UK (both roads and trains.)&lt;br /&gt;
* It is close(ish) to a few data centres and high speed Internet uplinks.&lt;br /&gt;
* We were there last time and it seemed to work well&lt;br /&gt;
Bonus: it is very close to Bletchley Park :)&lt;br /&gt;
&lt;br /&gt;
===How big is it?===&lt;br /&gt;
&lt;br /&gt;
In 2012, we had an attendance limit of 500 and fully sold out. This year we are expecting around 1,200 people. Buy your ticket early to avoid disappointment.&lt;br /&gt;
&lt;br /&gt;
==Ticket Sales==&lt;br /&gt;
===How can I get a ticket?===&lt;br /&gt;
Tickets are on sale from our web site here:&lt;br /&gt;
&lt;br /&gt;
'''https://www.emfcamp.org/tickets/choose'''&lt;br /&gt;
&lt;br /&gt;
This time there will be no day tickets and camp tickets are likely to sell out in advance.&lt;br /&gt;
&lt;br /&gt;
===How much does it cost?===&lt;br /&gt;
Adult tickets are currently £105.  There are tickets available for under-16s at a lower price (accompanied by an adult). Children under 5 can attend for free.&lt;br /&gt;
&lt;br /&gt;
If you have a Camper van you will need a Camper van ticket. &lt;br /&gt;
&lt;br /&gt;
If you want to bring a car you'll also need a car parking ticket.&lt;br /&gt;
&lt;br /&gt;
You can pay by bank transfer (in pounds sterling or Euros), a one-time direct debit (in pounds sterling or Euros), or by credit or debit card via Stripe (which charges a small fee).&lt;br /&gt;
&lt;br /&gt;
===What's the accessibility situation like?===&lt;br /&gt;
The site will be well lit during the event, and we will aim to cover access to the stages with trackway. Travelling between stages may take some time, though.&lt;br /&gt;
&lt;br /&gt;
There will be three accessible toilets and the current plan includes an accessible shower with a wheelchair ramp.&lt;br /&gt;
&lt;br /&gt;
We cannot guarantee 24/7 power for continuous positive airway pressure (CPAP) devices, but the power infrastructure team will be on call through the night.&lt;br /&gt;
&lt;br /&gt;
If you will be attending with a carer, they are entitled to a free ticket. Please [mailto:tickets@emfcamp.org email us] in advance so we can allocate the ticket.&lt;br /&gt;
&lt;br /&gt;
Registered assistance dogs will be allowed.&lt;br /&gt;
&lt;br /&gt;
If you have any other requirements, please tick the &amp;quot;I have accessibility requirements&amp;quot; checkbox when buying your ticket, and we'll be in touch for details. If you'd like to confirm anything before buying your ticket, please [mailto:tickets@emfcamp.org drop us an email].&lt;br /&gt;
&lt;br /&gt;
===Can I get a day ticket?===&lt;br /&gt;
Sorry, EMF 2012 was sold to capacity and we found that the day tickets prevented people from attending the whole event. For this reason, we can only offer tickets for the whole event. You are welcome to only come to one day, or to stay off-site and attend only during the days, but you will need a weekend ticket.&lt;br /&gt;
&lt;br /&gt;
===Can I get a family ticket?===&lt;br /&gt;
Unfortunately, as every attendee including children counts towards our capacity limit, we are unable to offer family or group tickets. We have however already discounted the child ticket prices by 60% which is as far as the budget allows.&lt;br /&gt;
&lt;br /&gt;
===Will I be able to turn up and buy a ticket?===&lt;br /&gt;
It is unlikely that any tickets will remain by the time of the event. Watch this space.&lt;br /&gt;
&lt;br /&gt;
===Do volunteers pay for their ticket?===&lt;br /&gt;
Everyone who attends is expected to buy a ticket, including people in the organising team and all volunteers. So many people contribute to running EMF that it would financially impossible to give everyone who helps out a free ticket, and unfair to draw a line past which volunteers receive free tickets.&lt;br /&gt;
&lt;br /&gt;
The only exception to this rule are first aiders, who are expected to carry out three 8-hour shifts in return for a free ticket.&lt;br /&gt;
&lt;br /&gt;
===Is there an age limit?===&lt;br /&gt;
We encourage children and young people to attend. We are planning specific activities for children as well as daycare facilities, and will confirm more details nearer to the time.&lt;br /&gt;
&lt;br /&gt;
However there are a number of things to bear in mind:&lt;br /&gt;
* Children under the age of 14 must be accompanied by an adult at all times.&lt;br /&gt;
* There will be dangerous things on site, but they will be clearly marked.&lt;br /&gt;
* Licensed alcohol sales are only for people of age 18 and over. Bar staff will ask for ID.&lt;br /&gt;
&lt;br /&gt;
===Can't enter the transaction reference?===&lt;br /&gt;
If you are having trouble entering the transaction reference into your online banking, just remove the hyphen. Some banks don't like it and don't tell you.&lt;br /&gt;
&lt;br /&gt;
===What's your IBAN/BIC details?===&lt;br /&gt;
Select a ticket valued in EUR on the front page. You will be presented with the necessary IBAN/BIC transfer details. Foreign transactions are not supported for GBP tickets.&lt;br /&gt;
&lt;br /&gt;
===Do you have a Code of Conduct?===&lt;br /&gt;
Yes, please see [https://www.emfcamp.org/code-of-conduct Code of conduct]. If you buy a ticket you are agreeing to abide by this.&lt;br /&gt;
&lt;br /&gt;
===What terms and conditions apply to ticket sales and attendance?===&lt;br /&gt;
Please see our [https://www.emfcamp.org/pay/terms terms] page.&lt;br /&gt;
&lt;br /&gt;
===Can I pay more? TAKE MY MONEY!===&lt;br /&gt;
&lt;br /&gt;
If you can afford it and wish to help support the event financially by paying a bit more for your ticket, you can buy a Supporter ticket. We're a non-profit event and so the money will go towards making the event even more awesome.&lt;br /&gt;
&lt;br /&gt;
==Planning your Attendance==&lt;br /&gt;
===Where is it? How can I get there?===&lt;br /&gt;
Refer to [[Location]]. '''NOTE: We have moved!''' It's only a few miles down the road, but please don't go to the old site!&lt;br /&gt;
&lt;br /&gt;
===When can I arrive? When do I have to leave by?===&lt;br /&gt;
The site will open to ticket holders at 10:00 Friday morning.&lt;br /&gt;
&lt;br /&gt;
All ticket holders must leave the site by 12:00 Monday.&lt;br /&gt;
&lt;br /&gt;
We will be there before and afterwards setting up and packing up, if you want to help with this please let us know and we can make arrangements. It's worth noting outside these times we can't guarantee availability of toilets/water/electricity/internet etc.&lt;br /&gt;
&lt;br /&gt;
Have a look at our Timeline for an updated summary.&lt;br /&gt;
&lt;br /&gt;
===When do things kick off?===&lt;br /&gt;
The talks and workshops will begin after lunch on Friday, although people will be setting up earlier in the day. You can arrive from 10am.&lt;br /&gt;
&lt;br /&gt;
Talks and workshops run daily through to the evening, although we expect villages will be doing things late into the night!&lt;br /&gt;
&lt;br /&gt;
===What should I bring?===&lt;br /&gt;
Please take a look at our [[Packing List]] for information on what you should and shouldn't bring.&lt;br /&gt;
&lt;br /&gt;
===Will there be food?===&lt;br /&gt;
We appreciate we didn't do well at this last time. This year we have lined up multiple food stalls, hopefully catering to all your needs. Initial details are at [[Food]]&lt;br /&gt;
&lt;br /&gt;
===Will there be a bar?===&lt;br /&gt;
Yes, we'll be running a volunteer-staffed licensed bar selling beer and wine, as well as soft drinks and the hacker energy drink Club Mate. Far from the usual crap festival beer, we will be serving real ale from local breweries with all profits going towards making the next iteration of Electromagnetic Field more awesome.&lt;br /&gt;
&lt;br /&gt;
The bar on site opening hours are subject to licensing which will be finalised soon.&lt;br /&gt;
&lt;br /&gt;
By the camping areas there will also be push taps of drinking water available for free.&lt;br /&gt;
&lt;br /&gt;
===Can I bring pets?===&lt;br /&gt;
Sorry, animals (except registered assistance dogs) are not allowed.&lt;br /&gt;
&lt;br /&gt;
===Can I smoke?===&lt;br /&gt;
Smoking is not allowed in any of the event tents or in the food/bar area. Elsewhere, please be considerate and very careful to extinguish your cigarettes to avoid setting the dry grass on fire. Please make sure cigarette butts are disposed of in rubbish bins rather than just thrown on the ground as the site is used by livestock at other times of the year, and it's a pain for the clean up crew to pick them up after the camp is over!&lt;br /&gt;
&lt;br /&gt;
===Can I bring X/Y/Z?===&lt;br /&gt;
tl;dr Probably&lt;br /&gt;
&lt;br /&gt;
Please let us know if it's going to be large/use a lot of power/be noisy or anything else you think we should know. We don't plan on stopping people bringing the latest cool laser helmet for shark 3d printer arduino powered UAV thing, but we need to plan for it. Note that access to the site is several hundred metres from the carpark and you will not be able to drive up to the site.&lt;br /&gt;
&lt;br /&gt;
Things prohibited by our contract: balloons, sky lanterns and the like.&lt;br /&gt;
&lt;br /&gt;
===Can I leave and re-enter?===&lt;br /&gt;
Your wristband will allow re-admittance, but the site is gated and we will be trying to restrict movements to daylight hours. In reality this is unlikely to be a problem, but please speak to us if you have any special requirements. The farm gate is locked overnight and would require a volunteer to come up to let you out.&lt;br /&gt;
&lt;br /&gt;
Please note that it is a condition of our contract that we don't allow you to roam the farm. Apart from anything else, there is likely to be heavy farm machinery in operation. For this reason, the entire event area is fenced off. We can shuttle you to the parking area, from where you may drive off the site or be collected.&lt;br /&gt;
&lt;br /&gt;
==Camp Infrastructure==&lt;br /&gt;
===Can I see the camp layout?===&lt;br /&gt;
We're working on this at the moment. Some initial information can be found at: [[Location]].&lt;br /&gt;
&lt;br /&gt;
You can see the site map at [http://map.emfcamp.org/ map.emfcamp.org]. Please note that this is still in early stages of development; we know it is slow and has bugs, don't worry about reporting them. All layout is still subject to change.&lt;br /&gt;
&lt;br /&gt;
===Is there parking available?===&lt;br /&gt;
Yes. Parking tickets are on sale with tickets. Please note the car park is not adjacent to the site, but there will be a shuttle. You will not be able to drive up to or onto the site to drop anything off.&lt;br /&gt;
&lt;br /&gt;
If you don't yet know whether you will be bringing a car, you can buy your event ticket now and buy a parking ticket at a later date (deadline to be announced, probably early August).&lt;br /&gt;
&lt;br /&gt;
Parking tickets are not required for motorcycles.&lt;br /&gt;
&lt;br /&gt;
===Can I bring my camper van?===&lt;br /&gt;
We have limited parking for camper vans - you can buy a ticket for £30 through our tickets site. These tickets include a parking ticket for the towing car in the car park.&lt;br /&gt;
&lt;br /&gt;
===Will there be Internet access?===&lt;br /&gt;
Yes, we are provisioning onsite high speed wifi and wired access (direct to your tent!), see [[Network]].&lt;br /&gt;
&lt;br /&gt;
===Can I make a fire, or bring my own BBQ?===&lt;br /&gt;
&lt;br /&gt;
Fires on the ground are strictly prohibited. Please adhere to this requirement of both the landowner and health and safety.&lt;br /&gt;
&lt;br /&gt;
Barbecues must be used off the ground. If you have a raised fire pit this is also acceptable.&lt;br /&gt;
&lt;br /&gt;
Foraging for wood on the site is not permitted according to the terms of our contract with the landowners. Please bring your own fuel to site.&lt;br /&gt;
&lt;br /&gt;
===I see a lake on the satellite image. Can I do X in it?===&lt;br /&gt;
&lt;br /&gt;
The lake and brook are out of bounds by order of the site owner!&lt;br /&gt;
&lt;br /&gt;
===What about medical cover?===&lt;br /&gt;
&lt;br /&gt;
We will have our our own lovely volunteer first aiders + SJA coverage.&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
===What will I be able to do?===&lt;br /&gt;
We're planning a full line up of speakers and workshops as well as awesome things around the site. We will also be supporting community organised 'villages' and looking for volunteers to help run the event.&lt;br /&gt;
&lt;br /&gt;
===What is a 'Village'?===&lt;br /&gt;
Villages are camps organised around a theme, it could be anything, but is often a location or a topic (e.g. lock-picking). By organising villages ahead of time we can help provide better equipment (e.g. large tents to use) as well as making sure that they have an area ahead of time. If you want to find out more about villages, join one or see what villages have already been organised check the [[Villages]] page.&lt;br /&gt;
&lt;br /&gt;
===How do I give a talk/run a workshop?===&lt;br /&gt;
&lt;br /&gt;
The [https://www.emfcamp.org/cfp Call for Participation] is now open, so if you want to give a talk or run a workshop, please fill in the form soon. We really want a wide variety of topics from as diverse a group of people as we can, so don't be shy! If you've missed the CfP then don't worry, there will be [http://en.wikipedia.org/wiki/Lightning_talk lightning talk] sessions and villages are welcome to run their own talks and workshops.&lt;br /&gt;
&lt;br /&gt;
===Would people be interested in a talk on X?===&lt;br /&gt;
Yes. There are obviously a few caveats on that but they're covered in the [https://www.emfcamp.org/cfp Call for Participation]&lt;br /&gt;
&lt;br /&gt;
===I want to bring/make something awesome, can you help?===&lt;br /&gt;
Hopefully. We have a limited budget to put towards making the camp amazing and we want to share it with those of you who will bring awesome things. At EMF2012 we had a giant hammock, floating LEDs, a wooden dinosaur and 'EMF' written in 5m tall steel letters. If there's something amazing that you'd like to make and bring along but need some help buying materials we'll be opening our submissions process soon.&lt;br /&gt;
&lt;br /&gt;
===How do I volunteer?===&lt;br /&gt;
The easiest way is to tick the 'interested in volunteering' box when you buy your ticket (sorry volunteers still need a ticket). If you missed it don't worry you can volunteer at any time by signing in and ticking the box. Once you've signed up to volunteer we'll get in contact with you closer to the time to organise shifts.&lt;br /&gt;
&lt;br /&gt;
==Villages==&lt;br /&gt;
=== Can we reserve a location for our village? ===&lt;br /&gt;
No, not really. What is possible is to obtain an advisory lock on a certain general area, but there will be no reservation system in place and if your village shows up late the spot may be taken.&lt;br /&gt;
&lt;br /&gt;
=== When can I build my village? ===&lt;br /&gt;
we are working on answering that question very soon. This mainly relies on toilets, water and power being availible. We will post some information later on the [[Villages|village page]] in the wiki.&lt;br /&gt;
&lt;br /&gt;
=== Our village wants to rent a tent, is that possible? ===&lt;br /&gt;
We are working on that, information about that will be added to [[Villages|the wiki]] when availible. &lt;br /&gt;
&lt;br /&gt;
=== Our village is planning a cool workshop / performance / ..., can the program mention it? ===&lt;br /&gt;
We'd really like to do that! Please [mailto:contact@emfcamp.org get in touch].&lt;br /&gt;
&lt;br /&gt;
=== Our village is really big, does that need special planning? ===&lt;br /&gt;
Probably: yes. Please contact general@lists.emfcamp.org, the single point of contact for all things villages concern so far.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=FAQ&amp;diff=2058</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=FAQ&amp;diff=2058"/>
		<updated>2014-08-18T15:26:47Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
This is a work in progress. Keep checking for updates.&lt;br /&gt;
&lt;br /&gt;
==General==&lt;br /&gt;
===Who are you?===&lt;br /&gt;
Electromagnetic Field is run by a non-profit organisation and produced entirely by volunteers. We are members of well-known hackerspaces and other organisations. Get in touch if you want to join us in making this happen.&lt;br /&gt;
&lt;br /&gt;
===Why are you doing this?===&lt;br /&gt;
There now are dozens of hackerspaces and makerspaces in the UK and across Europe, and countless other communities of craftsmen, artists, designers, engineers who are interested in the same DIY ethic; but they have few opportunities to all meet up. Most events catering to these communities are small regional conferences and often focused on very specific themes.&lt;br /&gt;
&lt;br /&gt;
We want to change that :)&lt;br /&gt;
&lt;br /&gt;
===Why Milton Keynes?===&lt;br /&gt;
We looked at a fair number of candidate sites. The site we ended up with was the best candidate for a number of reasons:&lt;br /&gt;
* It comes at a comparably low price (some of the candidate sites we looked at asked for tens of thousands of £££.)&lt;br /&gt;
* It has great transport links to much of the UK (both roads and trains.)&lt;br /&gt;
* It is close(ish) to a few data centres and high speed Internet uplinks.&lt;br /&gt;
* We were there last time and it seemed to work well&lt;br /&gt;
Bonus: it is very close to Bletchley Park :)&lt;br /&gt;
&lt;br /&gt;
===How big is it?===&lt;br /&gt;
&lt;br /&gt;
In 2012, we had an attendance limit of 500 and fully sold out. This year we are expecting around 1,200 people. Buy your ticket early to avoid disappointment.&lt;br /&gt;
&lt;br /&gt;
==Ticket Sales==&lt;br /&gt;
===How can I get a ticket?===&lt;br /&gt;
Tickets are on sale from our web site here:&lt;br /&gt;
&lt;br /&gt;
'''https://www.emfcamp.org/tickets/choose'''&lt;br /&gt;
&lt;br /&gt;
This time there will be no day tickets and camp tickets are likely to sell out in advance.&lt;br /&gt;
&lt;br /&gt;
===How much does it cost?===&lt;br /&gt;
Adult tickets are currently £105.  There are tickets available for under-16s at a lower price (accompanied by an adult). Children under 5 can attend for free.&lt;br /&gt;
&lt;br /&gt;
If you have a Camper van you will need a Camper van ticket. &lt;br /&gt;
&lt;br /&gt;
If you want to bring a car you'll also need a car parking ticket.&lt;br /&gt;
&lt;br /&gt;
You can pay by bank transfer (in pounds sterling or Euros), a one-time direct debit (in pounds sterling or Euros), or by credit or debit card via Stripe (which charges a small fee).&lt;br /&gt;
&lt;br /&gt;
===What's the accessibility situation like?===&lt;br /&gt;
The site will be well lit during the event, and we will aim to cover access to the stages with trackway. Travelling between stages may take some time, though.&lt;br /&gt;
&lt;br /&gt;
There will be three accessible toilets and the current plan includes an accessible shower with a wheelchair ramp.&lt;br /&gt;
&lt;br /&gt;
We cannot guarantee 24/7 power for continuous positive airway pressure (CPAP) devices, but the power infrastructure team will be on call through the night.&lt;br /&gt;
&lt;br /&gt;
If you will be attending with a carer, they are entitled to a free ticket. Please [mailto:tickets@emfcamp.org email us] in advance so we can allocate the ticket.&lt;br /&gt;
&lt;br /&gt;
Registered assistance dogs will be allowed.&lt;br /&gt;
&lt;br /&gt;
If you have any other requirements, please tick the &amp;quot;I have accessibility requirements&amp;quot; checkbox when buying your ticket, and we'll be in touch for details. If you'd like to confirm anything before buying your ticket, please [mailto:tickets@emfcamp.org drop us an email].&lt;br /&gt;
&lt;br /&gt;
===Can I get a day ticket?===&lt;br /&gt;
Sorry, EMF 2012 was sold to capacity and we found that the day tickets prevented people from attending the whole event. For this reason, we can only offer tickets for the whole event. You are welcome to only come to one day, or to stay off-site and attend only during the days, but you will need a weekend ticket.&lt;br /&gt;
&lt;br /&gt;
===Can I get a family ticket?===&lt;br /&gt;
Unfortunately, as every attendee including children counts towards our capacity limit, we are unable to offer family or group tickets. We have however already discounted the child ticket prices by 60% which is as far as the budget allows.&lt;br /&gt;
&lt;br /&gt;
===Will I be able to turn up and buy a ticket?===&lt;br /&gt;
It is unlikely that any tickets will remain by the time of the event. Watch this space.&lt;br /&gt;
&lt;br /&gt;
===Do volunteers pay for their ticket?===&lt;br /&gt;
Everyone who attends is expected to buy a ticket, including people in the organising team and all volunteers. So many people contribute to running EMF that it would financially impossible to give everyone who helps out a free ticket, and unfair to draw a line past which volunteers receive free tickets.&lt;br /&gt;
&lt;br /&gt;
The only exception to this rule are first aiders, who are expected to carry out three 8-hour shifts in return for a free ticket.&lt;br /&gt;
&lt;br /&gt;
===Is there an age limit?===&lt;br /&gt;
We encourage children and young people to attend. We are planning specific activities for children as well as daycare facilities, and will confirm more details nearer to the time.&lt;br /&gt;
&lt;br /&gt;
However there are a number of things to bear in mind:&lt;br /&gt;
* Children under the age of 14 must be accompanied by an adult at all times.&lt;br /&gt;
* There will be dangerous things on site, but they will be clearly marked.&lt;br /&gt;
* Licensed alcohol sales are only for people of age 18 and over. Bar staff will ask for ID.&lt;br /&gt;
&lt;br /&gt;
===Can't enter the transaction reference?===&lt;br /&gt;
If you are having trouble entering the transaction reference into your online banking, just remove the hyphen. Some banks don't like it and don't tell you.&lt;br /&gt;
&lt;br /&gt;
===What's your IBAN/BIC details?===&lt;br /&gt;
Select a ticket valued in EUR on the front page. You will be presented with the necessary IBAN/BIC transfer details. Foreign transactions are not supported for GBP tickets.&lt;br /&gt;
&lt;br /&gt;
===Do you have a Code of Conduct?===&lt;br /&gt;
Yes, please see [https://www.emfcamp.org/code-of-conduct Code of conduct]. If you buy a ticket you are agreeing to abide by this.&lt;br /&gt;
&lt;br /&gt;
===What terms and conditions apply to ticket sales and attendance?===&lt;br /&gt;
Please see our [https://www.emfcamp.org/pay/terms terms] page.&lt;br /&gt;
&lt;br /&gt;
===Can I pay more? TAKE MY MONEY!===&lt;br /&gt;
&lt;br /&gt;
If you can afford it and wish to help support the event financially by paying a bit more for your ticket, you can buy a Supporter ticket. We're a non-profit event and so the money will go towards making the event even more awesome.&lt;br /&gt;
&lt;br /&gt;
==Planning your Attendance==&lt;br /&gt;
===Where is it? How can I get there?===&lt;br /&gt;
Refer to [[Location]]. '''NOTE: We have moved!''' It's only a few miles down the road, but please don't go to the old site!&lt;br /&gt;
&lt;br /&gt;
===When can I arrive? When do I have to leave by?===&lt;br /&gt;
The site will open to ticket holders at 10:00 Friday morning.&lt;br /&gt;
&lt;br /&gt;
All ticket holders must leave the site by 12:00 Monday.&lt;br /&gt;
&lt;br /&gt;
We will be there before and afterwards setting up and packing up, if you want to help with this please let us know and we can make arrangements. It's worth noting outside these times we can't guarantee availability of toilets/water/electricity/internet etc.&lt;br /&gt;
&lt;br /&gt;
Have a look at our Timeline for an updated summary.&lt;br /&gt;
&lt;br /&gt;
===When do things kick off?===&lt;br /&gt;
The talks and workshops will begin after lunch on Friday, although people will be setting up earlier in the day. You can arrive from 10am.&lt;br /&gt;
&lt;br /&gt;
Talks and workshops run daily through to the evening, although we expect villages will be doing things late into the night!&lt;br /&gt;
&lt;br /&gt;
===What should I bring?===&lt;br /&gt;
Please take a look at our [[Packing List]] for information on what you should and shouldn't bring.&lt;br /&gt;
&lt;br /&gt;
===Will there be food?===&lt;br /&gt;
We appreciate we didn't do well at this last time. This year we have lined up multiple food stalls, hopefully catering to all your needs. Initial details are at [[Food]]&lt;br /&gt;
&lt;br /&gt;
===Will there be a bar?===&lt;br /&gt;
Yes, we'll be running a volunteer-staffed licensed bar selling beer and wine, as well as soft drinks and the hacker energy drink Club Mate. Far from the usual crap festival beer, we will be serving real ale from local breweries with all profits going towards making the next iteration of Electromagnetic Field more awesome.&lt;br /&gt;
&lt;br /&gt;
The bar on site opening hours are subject to licensing which will be finalised soon.&lt;br /&gt;
&lt;br /&gt;
By the camping areas there will also be push taps of drinking water available for free.&lt;br /&gt;
&lt;br /&gt;
===Can I bring pets?===&lt;br /&gt;
Sorry, animals (except registered assistance dogs) are not allowed.&lt;br /&gt;
&lt;br /&gt;
===Can I smoke?===&lt;br /&gt;
Smoking is not allowed in any of the event tents or in the food/bar area. Elsewhere, please be considerate and very careful to extinguish your cigarettes to avoid setting the dry grass on fire. Please make sure cigarette butts are disposed of in rubbish bins rather than just thrown on the ground as the site is used by livestock at other times of the year, and it's a pain for the clean up crew to pick them up after the camp is over!&lt;br /&gt;
&lt;br /&gt;
===Can I bring X/Y/Z?===&lt;br /&gt;
tl;dr Probably&lt;br /&gt;
&lt;br /&gt;
Please let us know if it's going to be large/use a lot of power/be noisy or anything else you think we should know. We don't plan on stopping people bringing the latest cool laser helmet for shark 3d printer arduino powered UAV thing, but we need to plan for it. Note that access to the site is several hundred metres from the carpark and you will not be able to drive up to the site.&lt;br /&gt;
&lt;br /&gt;
Things prohibited by our contract: balloons, sky lanterns and the like.&lt;br /&gt;
&lt;br /&gt;
===Can I leave and re-enter?===&lt;br /&gt;
Your wristband will allow re-admittance, but the site is gated and we will be trying to restrict movements to daylight hours. In reality this is unlikely to be a problem, but please speak to us if you have any special requirements. The farm gate is locked overnight and would require a volunteer to come up to let you out.&lt;br /&gt;
&lt;br /&gt;
Please note that it is a condition of our contract that we don't allow you to roam the farm. Apart from anything else, there is likely to be heavy farm machinery in operation. For this reason, the entire event area is fenced off. We can shuttle you to the parking area, from where you may drive off the site or be collected.&lt;br /&gt;
&lt;br /&gt;
==Camp Infrastructure==&lt;br /&gt;
===Can I see the camp layout?===&lt;br /&gt;
We're working on this at the moment. Some initial information can be found at: [[Location]].&lt;br /&gt;
&lt;br /&gt;
You can see the site map at [http://map.emfcamp.org/ map.emfcamp.org]. Please note that this is still in early stages of development; we know it is slow and has bugs, don't worry about reporting them. All layout is still subject to change.&lt;br /&gt;
&lt;br /&gt;
===Is there parking available?===&lt;br /&gt;
Yes. Parking tickets are on sale with tickets. Please note the car park is not adjacent to the site, but there will be a shuttle. You will not be able to drive up to or onto the site to drop anything off.&lt;br /&gt;
&lt;br /&gt;
If you don't yet know whether you will be bringing a car, you can buy your event ticket now and buy a parking ticket at a later date (deadline to be announced, probably early August).&lt;br /&gt;
&lt;br /&gt;
Parking tickets are not required for motorcycles.&lt;br /&gt;
&lt;br /&gt;
===Can I bring my camper van?===&lt;br /&gt;
We have limited parking for camper vans - you can buy a ticket for £30 through our tickets site. These tickets include a parking ticket for the towing car in the car park.&lt;br /&gt;
&lt;br /&gt;
===Will there be Internet access?===&lt;br /&gt;
Yes, we are provisioning onsite high speed wifi and wired access (direct to your tent!), see [[Network]].&lt;br /&gt;
&lt;br /&gt;
===Can I make a fire, or bring my own BBQ?===&lt;br /&gt;
&lt;br /&gt;
Fires on the ground are strictly prohibited. Please adhere to this requirement of both the landowner and health and safety.&lt;br /&gt;
&lt;br /&gt;
Barbecues must be used off the ground to reduce fire risk and prevent damaging the ground. If you have a raised fire pit this is also acceptable.&lt;br /&gt;
&lt;br /&gt;
Foraging for wood on the site is not permitted according to the terms of our contract with the landowners. Please bring your own fuel to site.&lt;br /&gt;
&lt;br /&gt;
===I see a lake on the satellite image. Can I do X in it?===&lt;br /&gt;
&lt;br /&gt;
The lake and brook are out of bounds by order of the site owner!&lt;br /&gt;
&lt;br /&gt;
===What about medical cover?===&lt;br /&gt;
&lt;br /&gt;
We will have our our own lovely volunteer first aiders + SJA coverage.&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
===What will I be able to do?===&lt;br /&gt;
We're planning a full line up of speakers and workshops as well as awesome things around the site. We will also be supporting community organised 'villages' and looking for volunteers to help run the event.&lt;br /&gt;
&lt;br /&gt;
===What is a 'Village'?===&lt;br /&gt;
Villages are camps organised around a theme, it could be anything, but is often a location or a topic (e.g. lock-picking). By organising villages ahead of time we can help provide better equipment (e.g. large tents to use) as well as making sure that they have an area ahead of time. If you want to find out more about villages, join one or see what villages have already been organised check the [[Villages]] page.&lt;br /&gt;
&lt;br /&gt;
===How do I give a talk/run a workshop?===&lt;br /&gt;
&lt;br /&gt;
The [https://www.emfcamp.org/cfp Call for Participation] is now open, so if you want to give a talk or run a workshop, please fill in the form soon. We really want a wide variety of topics from as diverse a group of people as we can, so don't be shy! If you've missed the CfP then don't worry, there will be [http://en.wikipedia.org/wiki/Lightning_talk lightning talk] sessions and villages are welcome to run their own talks and workshops.&lt;br /&gt;
&lt;br /&gt;
===Would people be interested in a talk on X?===&lt;br /&gt;
Yes. There are obviously a few caveats on that but they're covered in the [https://www.emfcamp.org/cfp Call for Participation]&lt;br /&gt;
&lt;br /&gt;
===I want to bring/make something awesome, can you help?===&lt;br /&gt;
Hopefully. We have a limited budget to put towards making the camp amazing and we want to share it with those of you who will bring awesome things. At EMF2012 we had a giant hammock, floating LEDs, a wooden dinosaur and 'EMF' written in 5m tall steel letters. If there's something amazing that you'd like to make and bring along but need some help buying materials we'll be opening our submissions process soon.&lt;br /&gt;
&lt;br /&gt;
===How do I volunteer?===&lt;br /&gt;
The easiest way is to tick the 'interested in volunteering' box when you buy your ticket (sorry volunteers still need a ticket). If you missed it don't worry you can volunteer at any time by signing in and ticking the box. Once you've signed up to volunteer we'll get in contact with you closer to the time to organise shifts.&lt;br /&gt;
&lt;br /&gt;
==Villages==&lt;br /&gt;
=== Can we reserve a location for our village? ===&lt;br /&gt;
No, not really. What is possible is to obtain an advisory lock on a certain general area, but there will be no reservation system in place and if your village shows up late the spot may be taken.&lt;br /&gt;
&lt;br /&gt;
=== When can I build my village? ===&lt;br /&gt;
we are working on answering that question very soon. This mainly relies on toilets, water and power being availible. We will post some information later on the [[Villages|village page]] in the wiki.&lt;br /&gt;
&lt;br /&gt;
=== Our village wants to rent a tent, is that possible? ===&lt;br /&gt;
We are working on that, information about that will be added to [[Villages|the wiki]] when availible. &lt;br /&gt;
&lt;br /&gt;
=== Our village is planning a cool workshop / performance / ..., can the program mention it? ===&lt;br /&gt;
We'd really like to do that! Please [mailto:contact@emfcamp.org get in touch].&lt;br /&gt;
&lt;br /&gt;
=== Our village is really big, does that need special planning? ===&lt;br /&gt;
Probably: yes. Please contact general@lists.emfcamp.org, the single point of contact for all things villages concern so far.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages:Women_and_non-binary&amp;diff=1708</id>
		<title>Villages:Women and non-binary</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages:Women_and_non-binary&amp;diff=1708"/>
		<updated>2014-08-15T11:31:12Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Village&lt;br /&gt;
|Name=Women and non-binary village&lt;br /&gt;
|Description=Village for women and non-binary people to camp, cook and chat together and feel a bit more secure.&lt;br /&gt;
|Contact=Drcable&lt;br /&gt;
|Activities=&lt;br /&gt;
&lt;br /&gt;
* Campingolely&lt;br /&gt;
* cooking&lt;br /&gt;
* chatting&lt;br /&gt;
* Possibly some talks and/or workshops&lt;br /&gt;
}}&lt;br /&gt;
This is a village for women and non-binary people to chat, camp and cook together and people identifying solely as men (be they cis or trans) are asked to respect this. The idea behind this village is to offer a space where people who face some of the same issues can meet with each other. Presentation will not be policed and it goes without saying that trans women are welcome. While we ask you to respect the personal space of people using this village, intention and behaviours are what counts. We recognise that the campsite is limited in terms of space and privacy. If you accidentally wander in, that's not a problem, but if you are asked to leave, please take that request seriously (as you would with any village). &lt;br /&gt;
&lt;br /&gt;
The village will be identified with a sign and some bunting – details of this are being finalised and will be posted here.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Talk:Villages:ElectroMagneticPhone&amp;diff=1377</id>
		<title>Talk:Villages:ElectroMagneticPhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Talk:Villages:ElectroMagneticPhone&amp;diff=1377"/>
		<updated>2014-08-06T13:43:49Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Jonty moved page Talk:Villages:ElectroMagneticPhone to Talk:Villages:FieldPhone: PUNNING NAME++&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Villages:FieldPhone]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Talk:Villages:FieldPhone&amp;diff=1376</id>
		<title>Talk:Villages:FieldPhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Talk:Villages:FieldPhone&amp;diff=1376"/>
		<updated>2014-08-06T13:43:49Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Jonty moved page Talk:Villages:ElectroMagneticPhone to Talk:Villages:FieldPhone: PUNNING NAME++&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SIP ==&lt;br /&gt;
&lt;br /&gt;
I've been working on [[Telephony]] and phones for orga, do you want to interconnect with this or maybe even take it over? It's just an Asterisk instance and a slew of Cisco IP phones. --[[User:Davidc|Davidc]] ([[User talk:Davidc|talk]]) 08:08, 10 July 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages:ElectroMagneticPhone&amp;diff=1375</id>
		<title>Villages:ElectroMagneticPhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages:ElectroMagneticPhone&amp;diff=1375"/>
		<updated>2014-08-06T13:43:49Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Jonty moved page Villages:ElectroMagneticPhone to Villages:FieldPhone: PUNNING NAME++&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Villages:FieldPhone]]&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages:FieldPhone&amp;diff=1374</id>
		<title>Villages:FieldPhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages:FieldPhone&amp;diff=1374"/>
		<updated>2014-08-06T13:43:49Z</updated>

		<summary type="html">&lt;p&gt;Jonty: Jonty moved page Villages:ElectroMagneticPhone to Villages:FieldPhone: PUNNING NAME++&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Village&lt;br /&gt;
|Name=Field Phone&lt;br /&gt;
|Description=We will be operating an attendee phone network.&lt;br /&gt;
&lt;br /&gt;
We are basing a lot of our plans off the experiences of Papa Legba at Burning Man and EventPhone.&lt;br /&gt;
|Activities=Lots of SIP, GSM etc etc&lt;br /&gt;
|Contact=Kevinprince&lt;br /&gt;
}}&lt;br /&gt;
More coming soon&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Workshops&amp;diff=1325</id>
		<title>Workshops</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Workshops&amp;diff=1325"/>
		<updated>2014-08-04T10:48:11Z</updated>

		<summary type="html">&lt;p&gt;Jonty: ARGH THIS IS NOT THE CFP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
== Electromagnetic Field 2014 Workshops ==&lt;br /&gt;
&lt;br /&gt;
Workshops are interactive events where you are expected to participate, learn, teach, and have a lot of fun. They range from lockpicking, soldering, debating, pentesting to robotics, making chiptunes and more.&lt;br /&gt;
&lt;br /&gt;
=== Planned workshops ===&lt;br /&gt;
&lt;br /&gt;
No workshops have been confirmed yet, watch this page for updates on this topic!&lt;br /&gt;
&lt;br /&gt;
=== Want to give a workshop? ===&lt;br /&gt;
&lt;br /&gt;
If you are interested in giving a workshop, please fill in the '''[https://www.emfcamp.org/cfp Call for Participation]'''.&lt;br /&gt;
&lt;br /&gt;
=== Workshops we'd like to see (suggestions) ===&lt;br /&gt;
* More blacksmithery (as per 2012)&lt;br /&gt;
* How to make a Klein bottle&lt;br /&gt;
* Green woodworking ([[http://www.mallinson.co.uk/courses.html this sort of thing]])&lt;br /&gt;
* The headhacking guy&lt;br /&gt;
* Stained glass&lt;br /&gt;
* Knitting&lt;br /&gt;
* Jewellery making (silver clay, etc.)&lt;br /&gt;
* Stop motion (with lego or hand made puppets)&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=1316</id>
		<title>Villages</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=1316"/>
		<updated>2014-08-04T10:06:19Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
{{link-banner}}&lt;br /&gt;
[[File:Ohm_villages.jpg|thumb|300px|Villages at OHM 2013]]&lt;br /&gt;
If you've never been to an event like Electromagnetic Field, the concept of villages might be new to you. Villages are camps within EMF run by attendees. They're organised around a theme, often a location or a topic (e.g. lock-picking). Many villages organise their own workshops or talks for other volunteers to attend. And of course, share all the fun together!&lt;br /&gt;
&lt;br /&gt;
By organising villages ahead of time we, can '''help provide better equipment''' (e.g. large tents to use), as well as '''allocating a location'''. You can bring a large tent to use as a gathering place, somewhere to run workshops, or somewhere to house your giant robot. We can provide power and a wired internet connection to your village.&lt;br /&gt;
&lt;br /&gt;
If you have any questions about villages drop an email to [mailto:villages@emfcamp.org villages@emfcamp.org], or [[IRC|drop into our IRC channel]].&lt;br /&gt;
&lt;br /&gt;
== List of Villages==&lt;br /&gt;
&lt;br /&gt;
{{#ask: [[Category:Village]]&lt;br /&gt;
| ?Name&lt;br /&gt;
| ?Description&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
(This list is automatically updated from villages registered on this wiki. It takes a little while to update.)&lt;br /&gt;
&lt;br /&gt;
== Register a Village ==&lt;br /&gt;
&lt;br /&gt;
To register your village, enter a short name for it below. You must be logged in to the wiki to register a village.&lt;br /&gt;
&lt;br /&gt;
{{#forminput:form=Village|query string=namespace=Villages|button text=Create Village}}&lt;br /&gt;
If you have any issues creating your village, get in touch with us at [mailto:villages@emfcamp.org villages@emfcamp.org]. We're happy to help out.&lt;br /&gt;
&lt;br /&gt;
==Village Tent Rental==&lt;br /&gt;
&lt;br /&gt;
We now have the ability to provide marquees and furniture for your village at-cost. [[Villages/Tents_Rental|You can find the price list here]].&lt;br /&gt;
&lt;br /&gt;
These will be set up and taken down for you.&lt;br /&gt;
&lt;br /&gt;
If you would like to hire one, contact [mailto:crypt@emfcamp.org crypt@emfcamp.org]&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
If you are planning a village, you might want to check out [[FAQ#Villages|Villages section of the FAQ]].&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=1315</id>
		<title>Villages</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=1315"/>
		<updated>2014-08-04T10:05:47Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
{{link-banner}}&lt;br /&gt;
[[File:Ohm_villages.jpg|thumb|300px|Villages at OHM 2013]]&lt;br /&gt;
If you've never been to an event like Electromagnetic Field, the concept of villages might be new to you. Villages are camps within EMF run by attendees. They're organised around a theme, often a location or a topic (e.g. lock-picking). Many villages organise their own workshops or talks for other volunteers to attend. And of course, share all the fun together!&lt;br /&gt;
&lt;br /&gt;
By organising villages ahead of time we, can '''help provide better equipment''' (e.g. large tents to use), as well as '''allocating a location'''. You can bring a large tent to use as a gathering place, somewhere to run workshops, or somewhere to house your giant robot. We can provide power and a wired internet connection to your village.&lt;br /&gt;
&lt;br /&gt;
If you have any questions about villages drop an email to [mailto:villages@emfcamp.org villages@emfcamp.org], or [[IRC|drop into our IRC channel]].&lt;br /&gt;
&lt;br /&gt;
== List of Villages==&lt;br /&gt;
&lt;br /&gt;
{{#ask: [[Category:Village]]&lt;br /&gt;
| ?Name&lt;br /&gt;
| ?Description&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
(This list is automatically updated from villages registered on this wiki. It takes a little while to update.)&lt;br /&gt;
&lt;br /&gt;
== Register a Village ==&lt;br /&gt;
&lt;br /&gt;
To register your village, enter a short name for it below. You must be logged in to the wiki to register a village.&lt;br /&gt;
&lt;br /&gt;
{{#forminput:form=Village|query string=namespace=Villages|button text=Create Village}}&lt;br /&gt;
If you have any issues creating your village, get in touch with us at [mailto:villages@emfcamp.org villages@emfcamp.org]. We're happy to help out.&lt;br /&gt;
&lt;br /&gt;
==Village Tent Rental==&lt;br /&gt;
&lt;br /&gt;
We now have the ability to provide marquees and furniture for your village at-cost. [[Villages/Tents_Rental|You can find the price list here]].&lt;br /&gt;
&lt;br /&gt;
These should come ready set up when you arrive on site.&lt;br /&gt;
&lt;br /&gt;
If you would like to hire one, contact [mailto:crypt@emfcamp.org crypt@emfcamp.org]&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
If you are planning a village, you might want to check out [[FAQ#Villages|Villages section of the FAQ]].&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=FAQ&amp;diff=884</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=FAQ&amp;diff=884"/>
		<updated>2014-07-07T18:23:42Z</updated>

		<summary type="html">&lt;p&gt;Jonty: /* Our village is planning a cool workshop / performance / ..., can the program mention it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{link-banner}}&lt;br /&gt;
This is a work in progress. Keep checking for updates.&lt;br /&gt;
&lt;br /&gt;
==General==&lt;br /&gt;
===Who are you?===&lt;br /&gt;
Electromagnetic Field is run by a non-profit organisation and produced entirely by volunteers. We are members of well-known hackerspaces and other organisations. Get in touch if you want to join us in making this happen.&lt;br /&gt;
&lt;br /&gt;
===Why are you doing this?===&lt;br /&gt;
There now are dozens of hackerspaces and makerspaces in the UK and across Europe, and countless other communities of craftsmen, artists, designers, engineers who are interested in the same DIY ethic; but they have few opportunities to all meet up. Most events catering to these communities are small regional conferences and often focused on very specific themes.&lt;br /&gt;
&lt;br /&gt;
We want to change that :)&lt;br /&gt;
&lt;br /&gt;
===Why Milton Keynes?===&lt;br /&gt;
We looked at a fair number of candidate sites. The site we ended up with was the best candidate for a number of reasons:&lt;br /&gt;
* It comes at a comparably low price (some of the candidate sites we looked at asked for tens of thousands of £££.)&lt;br /&gt;
* It has great transport links to much of the UK (both roads and trains.)&lt;br /&gt;
* It is close(ish) to a few data centres and high speed Internet uplinks.&lt;br /&gt;
* We were there last time and it seemed to work well&lt;br /&gt;
Bonus: it is very close to Bletchley Park :)&lt;br /&gt;
&lt;br /&gt;
===How big is it?===&lt;br /&gt;
&lt;br /&gt;
In 2012, we had an attendance limit of 500 and fully sold out. This year we are expecting around 1,200 people. Buy your ticket early to avoid disappointment.&lt;br /&gt;
&lt;br /&gt;
==Ticket Sales==&lt;br /&gt;
===How can I get a ticket?===&lt;br /&gt;
Tickets are on sale from our web site here:&lt;br /&gt;
&lt;br /&gt;
'''https://www.emfcamp.org/tickets/choose'''&lt;br /&gt;
&lt;br /&gt;
This time there will be no day tickets and camp tickets are likely to sell out in advance.&lt;br /&gt;
&lt;br /&gt;
===How much does it cost?===&lt;br /&gt;
Adult tickets are currently £105.  There are tickets available for under-16s at a lower price (accompanied by an adult). Children under 5 can attend for free.&lt;br /&gt;
&lt;br /&gt;
If you have a Camper van you will need a Camper van ticket. &lt;br /&gt;
&lt;br /&gt;
If you want to bring a car you'll also need a car parking ticket.&lt;br /&gt;
&lt;br /&gt;
You can pay by bank transfer (in pounds sterling or Euros), a one-time direct debit (in pounds sterling or Euros), or by credit or debit card via Stripe (which charges a small fee).&lt;br /&gt;
&lt;br /&gt;
===Can I get a day ticket?===&lt;br /&gt;
Sorry, EMF 2012 was sold to capacity and we found that the day tickets prevented people from attending the whole event. For this reason, we can only offer tickets for the whole event. You are welcome to only come to one day, or to stay off-site and attend only during the days, but you will need a weekend ticket.&lt;br /&gt;
&lt;br /&gt;
===Can I get a family ticket?===&lt;br /&gt;
Unfortunately, as every attendee including children counts towards our capacity limit, we are unable to offer family or group tickets. We have however already discounted the child ticket prices by 60% which is as far as the budget allows.&lt;br /&gt;
&lt;br /&gt;
===Will I be able to turn up and buy a ticket?===&lt;br /&gt;
It is unlikely that any tickets will remain by the time of the event. Watch this space.&lt;br /&gt;
&lt;br /&gt;
===Do volunteers pay for their ticket?===&lt;br /&gt;
Everyone is expected to buy a ticket, including people in the organising team and all volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is there an age limit?===&lt;br /&gt;
We encourage children and young people to attend. We are planning specific activities for children as well as daycare facilities, and will confirm more details nearer to the time.&lt;br /&gt;
&lt;br /&gt;
However there are a number of things to bear in mind:&lt;br /&gt;
* Children under the age of 14 must be accompanied by an adult at all times.&lt;br /&gt;
* There will be dangerous things on site, but they will be clearly marked.&lt;br /&gt;
* Licensed alcohol sales are only for people of age 18 and over. Bar staff will ask for ID.&lt;br /&gt;
&lt;br /&gt;
===Can't enter the transaction reference?===&lt;br /&gt;
If you are having trouble entering the transaction reference into your online banking, just remove the hyphen. Some banks don't like it and don't tell you.&lt;br /&gt;
&lt;br /&gt;
===Do you have a Code of Conduct?===&lt;br /&gt;
Yes, please see [https://www.emfcamp.org/code-of-conduct Code of conduct]. If you buy a ticket you are agreeing to abide by this.&lt;br /&gt;
&lt;br /&gt;
===What terms and conditions apply to ticket sales and attendance?===&lt;br /&gt;
Please see our [https://www.emfcamp.org/pay/terms terms] page.&lt;br /&gt;
&lt;br /&gt;
===Can I pay more? TAKE MY MONEY!===&lt;br /&gt;
&lt;br /&gt;
If you can afford it and wish to help support the event financially by paying a bit more for your ticket, you can buy a Supporter ticket. We're a non-profit event and so the money will go towards making the event even more awesome.&lt;br /&gt;
&lt;br /&gt;
==Planning your Attendance==&lt;br /&gt;
===Where is it? How can I get there?===&lt;br /&gt;
Refer to [[Location]]. '''NOTE: We have moved!''' It's only a few miles down the road, but please don't go to the old site!&lt;br /&gt;
&lt;br /&gt;
===When can I arrive? When do I have to leave by?===&lt;br /&gt;
The site will open to ticket holders at 10:00 Friday morning.&lt;br /&gt;
&lt;br /&gt;
All ticket holders must leave the site by 12:00 Monday.&lt;br /&gt;
&lt;br /&gt;
We will be there before and afterwards setting up and packing up, if you want to help with this please let us know and we can make arrangements. It's worth noting outside these times we can't guarantee availability of toilets/water/electricity/internet etc.&lt;br /&gt;
&lt;br /&gt;
Have a look at our Timeline for an updated summary.&lt;br /&gt;
&lt;br /&gt;
===When do things kick off?===&lt;br /&gt;
The talks and workshops will begin after lunch on Friday, although people will be setting up earlier in the day. You can arrive from 10am.&lt;br /&gt;
&lt;br /&gt;
Talks and workshops run daily through to the evening, although we expect villages will be doing things late into the night!&lt;br /&gt;
&lt;br /&gt;
===What should I bring?===&lt;br /&gt;
Please take a look at our [[Packing List]] for information on what you should and shouldn't bring.&lt;br /&gt;
&lt;br /&gt;
===Will there be food?===&lt;br /&gt;
We appreciate we didn't do well at this last time. This year we have lined up multiple food stalls, hopefully catering to all your needs. Initial details are at [[Food]]&lt;br /&gt;
&lt;br /&gt;
===Will there be a bar?===&lt;br /&gt;
Yes, we'll be running a volunteer-staffed licensed bar selling beer and wine, as well as soft drinks and the hacker energy drink Club Mate. Far from the usual crap festival beer, we will be serving real ale from local breweries with all profits going towards making the next iteration of Electromagnetic Field more awesome.&lt;br /&gt;
&lt;br /&gt;
The bar on site opening hours are subject to licensing which will be finalised soon.&lt;br /&gt;
&lt;br /&gt;
By the camping areas there will also be push taps of drinking water available for free.&lt;br /&gt;
&lt;br /&gt;
===Can I bring pets?===&lt;br /&gt;
Sorry, animals (except registered assistance dogs) are not allowed.&lt;br /&gt;
&lt;br /&gt;
===Can I smoke?===&lt;br /&gt;
Smoking is not allowed in any of the event tents or in the food/bar area. Elsewhere, please be considerate and very careful to extinguish your cigarettes to avoid setting the dry grass on fire. Please make sure cigarette butts are disposed of in rubbish bins rather than just thrown on the ground as the site is used by livestock at other times of the year, and it's a pain for the clean up crew to pick them up after the camp is over!&lt;br /&gt;
&lt;br /&gt;
===Can I bring X/Y/Z?===&lt;br /&gt;
tl;dr Probably&lt;br /&gt;
&lt;br /&gt;
Please let us know if it's going to be large/use a lot of power/be noisy or anything else you think we should know. We don't plan on stopping people bringing the latest cool laser helmet for shark 3d printer arduino powered UAV thing, but we need to plan for it. Note that access to the site is several hundred metres from the carpark and you will not be able to drive up to the site.&lt;br /&gt;
&lt;br /&gt;
Things prohibited by our contract: balloons, sky lanterns and the like.&lt;br /&gt;
&lt;br /&gt;
===Can I leave and re-enter?===&lt;br /&gt;
Your wristband will allow re-admittance, but the site is gated and we will be trying to restrict movements to daylight hours. In reality this is unlikely to be a problem, but please speak to us if you have any special requirements. The farm gate is locked overnight and would require a volunteer to come up to let you out.&lt;br /&gt;
&lt;br /&gt;
Please note that it is a condition of our contract that we don't allow you to roam the farm. Apart from anything else, there is likely to be heavy farm machinery in operation. For this reason, the entire event area is fenced off. We can shuttle you to the parking area, from where you may drive off the site or be collected.&lt;br /&gt;
&lt;br /&gt;
==Camp Infrastructure==&lt;br /&gt;
===Can I see the camp layout?===&lt;br /&gt;
We're working on this at the moment. Some initial information can be found at: [[Location]].&lt;br /&gt;
&lt;br /&gt;
You can see the site map at [http://map.emfcamp.org/ map.emfcamp.org]. Please note that this is still in early stages of development; we know it is slow and has bugs, don't worry about reporting them. All layout is still subject to change.&lt;br /&gt;
&lt;br /&gt;
===Is there parking available?===&lt;br /&gt;
Yes. Parking tickets are on sale with tickets. Please note the car park is not adjacent to the site, but there will be a shuttle. You will not be able to drive up to or onto the site to drop anything off.&lt;br /&gt;
&lt;br /&gt;
If you don't yet know whether you will be bringing a car, you can buy your event ticket now and buy a parking ticket at a later date (deadline to be announced, probably early August).&lt;br /&gt;
&lt;br /&gt;
Parking tickets are not required for motorcycles.&lt;br /&gt;
&lt;br /&gt;
===Can I bring my camper van?===&lt;br /&gt;
We have limited parking for camper vans - you can buy a ticket for £30 through our tickets site. These tickets include a parking ticket for the towing car in the car park.&lt;br /&gt;
&lt;br /&gt;
===Will there be Internet access?===&lt;br /&gt;
Yes, we are provisioning onsite high speed wifi and wired access (direct to your tent!), see [[Network]].&lt;br /&gt;
&lt;br /&gt;
===Can I make a fire, or bring my own BBQ?===&lt;br /&gt;
&lt;br /&gt;
Open fire is strictly prohibited except in the main fire pit. Please adhere to this requirement of both the landowner and health and safety.&lt;br /&gt;
&lt;br /&gt;
Barbecues must be used off the ground to reduce fire risk and prevent damaging the ground.&lt;br /&gt;
&lt;br /&gt;
Foraging for wood on the site is not permitted according to the terms of our contract with the landowners. Please bring your own fuel to site.&lt;br /&gt;
&lt;br /&gt;
===I see a lake on the satellite image. Can I do X in it?===&lt;br /&gt;
&lt;br /&gt;
The lake and brook are out of bounds by order of the site owner!&lt;br /&gt;
&lt;br /&gt;
===What about medical cover?===&lt;br /&gt;
&lt;br /&gt;
We will have our our own lovely volunteer first aiders + SJA coverage.&lt;br /&gt;
&lt;br /&gt;
==Getting Involved==&lt;br /&gt;
===What will I be able to do?===&lt;br /&gt;
We're planning a full line up of speakers and workshops as well as awesome things around the site. We will also be supporting community organised 'villages' and looking for volunteers to help run the event.&lt;br /&gt;
&lt;br /&gt;
===What is a 'Village'?===&lt;br /&gt;
Villages are camps organised around a theme, it could be anything, but is often a location or a topic (e.g. lock-picking). By organising villages ahead of time we can help provide better equipment (e.g. large tents to use) as well as making sure that they have an area ahead of time. If you want to find out more about villages, join one or see what villages have already been organised check the [[Villages]] page.&lt;br /&gt;
&lt;br /&gt;
===How do I give a talk/run a workshop?===&lt;br /&gt;
&lt;br /&gt;
The [https://www.emfcamp.org/cfp Call for Participation] is now open, so if you want to give a talk or run a workshop, please fill in the form soon. We really want a wide variety of topics from as diverse a group of people as we can, so don't be shy! If you've missed the CfP then don't worry, there will be [http://en.wikipedia.org/wiki/Lightning_talk lightning talk] sessions and villages are welcome to run their own talks and workshops.&lt;br /&gt;
&lt;br /&gt;
===Would people be interested in a talk on X?===&lt;br /&gt;
Yes. There are obviously a few caveats on that but they're covered in the [https://www.emfcamp.org/cfp Call for Participation]&lt;br /&gt;
&lt;br /&gt;
===I want to bring/make something awesome, can you help?===&lt;br /&gt;
Hopefully. We have a limited budget to put towards making the camp amazing and we want to share it with those of you who will bring awesome things. At EMF2012 we had a giant hammock, floating LEDs, a wooden dinosaur and 'EMF' written in 5m tall steel letters. If there's something amazing that you'd like to make and bring along but need some help buying materials we'll be opening our submissions process soon.&lt;br /&gt;
&lt;br /&gt;
===How do I volunteer?===&lt;br /&gt;
The easiest way is to tick the 'interested in volunteering' box when you buy your ticket (sorry volunteers still need a ticket). If you missed it don't worry you can volunteer at any time by signing in and ticking the box. Once you've signed up to volunteer we'll get in contact with you closer to the time to organise shifts.&lt;br /&gt;
&lt;br /&gt;
==Villages==&lt;br /&gt;
=== Can we reserve a location for our village? ===&lt;br /&gt;
No, not really. What is possible is to obtain an advisory lock on a certain general area, but there will be no reservation system in place and if your village shows up late the spot may be taken.&lt;br /&gt;
&lt;br /&gt;
=== When can I build my village? ===&lt;br /&gt;
we are working on answering that question very soon. This mainly relies on toilets, water and power being availible. We will post some information later on the [[Villages|village page]] in the wiki.&lt;br /&gt;
&lt;br /&gt;
=== Our village wants to rent a tent, is that possible? ===&lt;br /&gt;
We are working on that, information about that will be added to [[Villages|the wiki]] when availible. &lt;br /&gt;
&lt;br /&gt;
=== Our village is planning a cool workshop / performance / ..., can the program mention it? ===&lt;br /&gt;
We'd really like to do that! Please [mailto:contact@emfcamp.org get in touch].&lt;br /&gt;
&lt;br /&gt;
=== Our village is really big, does that need special planning? ===&lt;br /&gt;
Probably: yes. Please contact general@lists.emfcamp.org, the single point of contact for all things villages concern so far.&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=883</id>
		<title>Villages</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=883"/>
		<updated>2014-07-07T18:21:57Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
If you've never been to an event like Electromagnetic Field the concept of villages might be new to you. Villages are camps within EMF run by attendees. They're organised around a theme, often a location or a topic (e.g. lock-picking). Many villages organise their own workshops and lectures for other volunteers to attend. And of course, share all the fun together!&lt;br /&gt;
&lt;br /&gt;
By organising villages ahead of time we, can '''help provide better equipment''' (e.g. large tents to use), as well as '''allocating a location'''. You can bring a large tent to use as a gathering place, somewhere to run workshops, or somewhere to house your giant robot.&lt;br /&gt;
&lt;br /&gt;
If you have any questions about villages drop an email to [mailto:villages@emfcamp.org villages@emfcamp.org], or [[IRC|drop into our IRC channel]].&lt;br /&gt;
&lt;br /&gt;
== List of Villages==&lt;br /&gt;
&lt;br /&gt;
{{#ask: [[Category:Village]]&lt;br /&gt;
| ?Name&lt;br /&gt;
| ?Description&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
(This list is automatically updated from villages registered on this wiki. It takes a little while to update.)&lt;br /&gt;
&lt;br /&gt;
== Register a Village ==&lt;br /&gt;
&lt;br /&gt;
To register your village, enter a short name for it below. You must be logged in to the wiki to register a village.&lt;br /&gt;
&lt;br /&gt;
{{#forminput:form=Village}}&lt;br /&gt;
If you have any issues creating your village, get in touch with us at [mailto:villages@emfcamp.org villages@emfcamp.org]. We're happy to help out.&lt;br /&gt;
&lt;br /&gt;
==Village Tent Rental==&lt;br /&gt;
&lt;br /&gt;
We might have rental tents. Further information coming shortly!&lt;br /&gt;
&lt;br /&gt;
For information, please contact [mailto:general@lists.emfcamp.org general@lists.emfcamp.org].&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
If you are planning a village, you might want to check out [[FAQ#Villages|Villages section of the FAQ]].&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=882</id>
		<title>Villages</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=882"/>
		<updated>2014-07-07T18:21:12Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
If you've never been to an event like Electromagnetic Field the concept of villages might be new to you. Villages are camps within EMF run by attendees. They're organised around a theme, often a location or a topic (e.g. lock-picking). Many villages organise their own workshops and lectures for other volunteers to attend. And of course, share all the fun together!&lt;br /&gt;
&lt;br /&gt;
By organising villages ahead of time we, can '''help provide better equipment''' (e.g. large tents to use), as well as '''allocating a location'''. You can bring a large tent to use as a gathering place, somewhere to run workshops, or somewhere to house your giant robot.&lt;br /&gt;
&lt;br /&gt;
If you have any questions about villages drop an email to [mailto:villages@emfcamp.org villages@emfcamp.org], or [IRC|drop into our IRC channel].&lt;br /&gt;
&lt;br /&gt;
== List of Villages==&lt;br /&gt;
&lt;br /&gt;
{{#ask: [[Category:Village]]&lt;br /&gt;
| ?Name&lt;br /&gt;
| ?Description&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
(This list is automatically updated from villages registered on this wiki. It takes a little while to update.)&lt;br /&gt;
&lt;br /&gt;
== Register a Village ==&lt;br /&gt;
&lt;br /&gt;
To register your village, enter a short name for it below. You must be logged in to the wiki to register a village.&lt;br /&gt;
&lt;br /&gt;
{{#forminput:form=Village}}&lt;br /&gt;
If you have any issues creating your village, get in touch with us at [mailto:villages@emfcamp.org villages@emfcamp.org]. We're happy to help out.&lt;br /&gt;
&lt;br /&gt;
==Village Tent Rental==&lt;br /&gt;
&lt;br /&gt;
We might have rental tents. Further information coming shortly!&lt;br /&gt;
&lt;br /&gt;
For information, please contact general@lists.emfcamp.org.&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
If you are planning a village, you might want to check out [[FAQ#Villages|Villages section of the FAQ]].&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=881</id>
		<title>Villages</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Villages&amp;diff=881"/>
		<updated>2014-07-07T18:20:45Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
If you've never been to an event like Electromagnetic Field the concept of villages might be new to you. Villages are camps within EMF run by attendees. They're organised around a theme, often a location or a topic (e.g. lock-picking). Many villages organise their own workshops and lectures for other volunteers to attend. And of course, share all the fun together!&lt;br /&gt;
&lt;br /&gt;
By organising villages ahead of time we, can '''help provide better equipment''' (e.g. large tents to use), as well as '''allocating a location'''. You can bring a large tent to use as a gathering place, somewhere to run workshops, or somewhere to house your giant robot.&lt;br /&gt;
&lt;br /&gt;
If you have any questions about villages drop an email to [mailto:villages@emfcamp.org villages@emfcamp.org], or [[IRC drop into our IRC channel]].&lt;br /&gt;
&lt;br /&gt;
== List of Villages==&lt;br /&gt;
&lt;br /&gt;
{{#ask: [[Category:Village]]&lt;br /&gt;
| ?Name&lt;br /&gt;
| ?Description&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
(This list is automatically updated from villages registered on this wiki. It takes a little while to update.)&lt;br /&gt;
&lt;br /&gt;
== Register a Village ==&lt;br /&gt;
&lt;br /&gt;
To register your village, enter a short name for it below. You must be logged in to the wiki to register a village.&lt;br /&gt;
&lt;br /&gt;
{{#forminput:form=Village}}&lt;br /&gt;
If you have any issues creating your village, get in touch with us at [mailto:villages@emfcamp.org villages@emfcamp.org]. We're happy to help out.&lt;br /&gt;
&lt;br /&gt;
==Village Tent Rental==&lt;br /&gt;
&lt;br /&gt;
We might have rental tents. Further information coming shortly!&lt;br /&gt;
&lt;br /&gt;
For information, please contact general@lists.emfcamp.org.&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
If you are planning a village, you might want to check out [[FAQ#Villages|Villages section of the FAQ]].&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
	<entry>
		<id>https://wiki.emfcamp.org/2014/w/index.php?title=Teams&amp;diff=428</id>
		<title>Teams</title>
		<link rel="alternate" type="text/html" href="https://wiki.emfcamp.org/2014/w/index.php?title=Teams&amp;diff=428"/>
		<updated>2014-03-10T22:21:00Z</updated>

		<summary type="html">&lt;p&gt;Jonty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Team&lt;br /&gt;
! Description&lt;br /&gt;
! Lead&lt;br /&gt;
! Deputy Lead(s)&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Admin]]&lt;br /&gt;
| Top-level organisation, licensing, site planning&lt;br /&gt;
| [[User:Russ]]&lt;br /&gt;
| [[User:Jonty]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Finance]]&lt;br /&gt;
| Dealing with the money&lt;br /&gt;
| [[User:Russ]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Power]]&lt;br /&gt;
| All things power&lt;br /&gt;
| [[User:Benny]]&lt;br /&gt;
| Will H&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:NOC]]&lt;br /&gt;
| Networking&lt;br /&gt;
| Will H&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Web]]&lt;br /&gt;
| Web sites, ticket sales, volunteering, and CfP systems&lt;br /&gt;
| [[User:ms7821|Mark]]&lt;br /&gt;
| [[User:JasperWallace]] (probably?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Content]]&lt;br /&gt;
| Organising talks/workshops/etc&lt;br /&gt;
| [[User:Jonty]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Bar]]&lt;br /&gt;
| Booze, and such&lt;br /&gt;
| [[User:Russ]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:First Aid]]&lt;br /&gt;
| Making sure we don't kill ourselves&lt;br /&gt;
| Oni&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Catering]]&lt;br /&gt;
| Organising food providers&lt;br /&gt;
| Nick&lt;br /&gt;
| [[User:JasperWallace]] (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:InfoDesk]]&lt;br /&gt;
| Providing information during the event&lt;br /&gt;
| ?&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Volunteering]]&lt;br /&gt;
| Managing volunteers across all stages&lt;br /&gt;
| ?&lt;br /&gt;
| Nick/Lyndsey/Kate&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Spawn]]&lt;br /&gt;
| Managing the kids area, activities, and childminding&lt;br /&gt;
| ?&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:AV]]&lt;br /&gt;
| Audio. Video. Streaming. That kind of thing.&lt;br /&gt;
| ?&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Shiny]]&lt;br /&gt;
| Site decoration, lights, installations. Shiny things.&lt;br /&gt;
| ?&lt;br /&gt;
| [[User:Jonty]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Team:Badge]]&lt;br /&gt;
| Badge building, and infrastructure.&lt;br /&gt;
| LWK&lt;br /&gt;
| Bob/[[User:Jonty]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Jonty</name></author>
	</entry>
</feed>