<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://badge.emfcamp.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Liedra</id>
	<title>EMF Badge - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://badge.emfcamp.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Liedra"/>
	<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/wiki/Special:Contributions/Liedra"/>
	<updated>2026-04-10T09:50:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Firmware_Update&amp;diff=220</id>
		<title>TiLDA MK3/Firmware Update</title>
		<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Firmware_Update&amp;diff=220"/>
		<updated>2016-08-11T10:12:07Z</updated>

		<summary type="html">&lt;p&gt;Liedra: /* Before you start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Update your Tilda Mk3==&lt;br /&gt;
&lt;br /&gt;
This websites will help you to update your Tilda Mk3 badge. But be careful, following these instructions will delete all files and setting on your badge, so make sure you have copies of everything!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before you start==&lt;br /&gt;
&lt;br /&gt;
You need to put your badge into DFU mode. To do this please press down the joystick button in the center while at the same time quickly pushing the reset button at the back. &lt;br /&gt;
&lt;br /&gt;
Your screen should go white and then you'll now be ready to update your badge. Note: screen does not always go white, but should go into DFU mode, so if you do the right button presses try it and see.&lt;br /&gt;
&lt;br /&gt;
==OSX==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites needed for Mac OS X'''&lt;br /&gt;
&lt;br /&gt;
1. XCode (from App Store)&lt;br /&gt;
&lt;br /&gt;
2. [http://docs.python-guide.org/en/latest/starting/install/osx/ Homebrew and Pip]&lt;br /&gt;
&lt;br /&gt;
3. You then need to (from the terminal) use homebrew to install libusb &amp;lt;code&amp;gt;brew install libusb&amp;lt;/code&amp;gt; and pip to install libusb1 and pyusb &amp;lt;code&amp;gt;pip install libusb1 pyusb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. You should be good to go! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open a terminal and execute this line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;curl --silent --show-error --retry 5 https://update.badge.emfcamp.org/update.py | python&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open a terminal and execute this line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;curl --silent --show-error --retry 5 https://update.badge.emfcamp.org/update.py | python&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On a Windows PC, you will need to download the STMicroelectronics DfuSe USB device firmware updater software http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-stm32080.html and use the 'Upgrade or Verify Action' part of the GUI to update the firmware instead.&lt;br /&gt;
&lt;br /&gt;
* Install the STMMicroelectronics util from the link above.&lt;br /&gt;
* Download the firmware.dfu file from https://update.badge.emfcamp.org/firmware.dfu and save it off.&lt;br /&gt;
* Start up DfuSeDemo.exe, and click the 'Choose' button - select the firmware.dfu file and then hit 'Upgrade'&lt;br /&gt;
* Your firmware will now be updated.&lt;br /&gt;
&lt;br /&gt;
== Other Operating systems==&lt;br /&gt;
&lt;br /&gt;
To update your badge please download the following script and run it via python: [https://update.badge.emfcamp.org/update.py update.py]&lt;br /&gt;
&lt;br /&gt;
If you know how to flash the badge yourself you can also download the DFU binary directly: [https://update.badge.emfcamp.org/firmware.dfu firmware.dfu]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build your own version==&lt;br /&gt;
&lt;br /&gt;
If you want to build your own version of the firmware have a look [https://badge.emfcamp.org/wiki/TiLDA_MK3/build here]&lt;/div&gt;</summary>
		<author><name>Liedra</name></author>
	</entry>
	<entry>
		<id>https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Get_Started&amp;diff=204</id>
		<title>TiLDA MK3/Get Started</title>
		<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Get_Started&amp;diff=204"/>
		<updated>2016-08-09T07:55:46Z</updated>

		<summary type="html">&lt;p&gt;Liedra: /* 6. (Optional) Update your badge's micropython */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Get started =&lt;br /&gt;
&lt;br /&gt;
Hacking your TiLDA badge is easy. We've written it down step by step. &lt;br /&gt;
&lt;br /&gt;
If something goes wrong, the badge can be [[TiLDA_MK3/reset|reset]] to its out-of-the-box state, so do not be concerned about breaking anything.&lt;br /&gt;
&lt;br /&gt;
== 1. Connect to your computer ==&lt;br /&gt;
To get started you need to connect your badge to a computer. You can use any MicroUSB cable - the same type that charges most mobile phones nowadays. It doesn't matter whether the batter is plugged in or not, so don't worry about it.&lt;br /&gt;
&lt;br /&gt;
== 2. Check your badge is found by your computer ==&lt;br /&gt;
Upon connecting the badge to a computer, it should appear as a &amp;quot;mass storage device&amp;quot; just like a USB key or an external hard disk. &lt;br /&gt;
&lt;br /&gt;
'''Important:''' Just like any other USB storage device, if you changed or copied anything on the Badge, please make sure to &amp;quot;eject&amp;quot; or &amp;quot;safely remove&amp;quot; before unplugging your badge or pressing the reset button. Otherwise you might lose all your work :(&lt;br /&gt;
&lt;br /&gt;
Windows will require a driver file for the serial port, which is stored on the badge's mass storage. [https://micropython.org/resources/Micro-Python-Windows-setup.pdf More information]&lt;br /&gt;
&lt;br /&gt;
== 3. Connect to your badge ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
* Please follow the instruction under the &amp;quot;Windows&amp;quot; section on this page: https://micropython.org/doc/tut-repl&lt;br /&gt;
* Once you've installed the driver and Putty and you've connected to your badge, press Control+C to stop the main badge app, and then you should be greeted by a line saying &amp;quot;Micropython&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== OSX ===&lt;br /&gt;
* Click the magnifying class in the top right of your screen and type &amp;lt;code&amp;gt;Terminal&amp;lt;/code&amp;gt; followed by Enter. A white terminal window should appear.&lt;br /&gt;
* type &amp;lt;code&amp;gt;screen /dev/tty.usbmodem*&amp;lt;/code&amp;gt; (The * is important, so don't let it out) and hit enter&lt;br /&gt;
* hit &amp;lt;code&amp;gt;control+c&amp;lt;/code&amp;gt;, if an error is displayed&lt;br /&gt;
* You should now be greeted by a line saying &amp;quot;Micropython&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
* Open a terminal and type &amp;lt;code&amp;gt;screen /dev/ttyACM0&amp;lt;/code&amp;gt;&lt;br /&gt;
* You should now be greeted by a line saying &amp;quot;Micropython&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== What to do if this step doesn't work? ===&lt;br /&gt;
* Press the reset button at the back of your badge and try again&lt;br /&gt;
* Have a look at https://micropython.org/doc/tut-repl for more information&lt;br /&gt;
&lt;br /&gt;
== 4. Your first line of Micropython ==&lt;br /&gt;
* In your terminal (next to the &amp;gt;&amp;gt;&amp;gt;) type &amp;lt;code&amp;gt;print(1 + 1)&amp;lt;/code&amp;gt; followed by Enter&lt;br /&gt;
* You should see &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; printed on the screen. Congratulations, you've just written your first line of micropython code!&lt;br /&gt;
* You can now close the terminal window (or Putty, if you're on Windows). Note: some serial terminals will not close when the badge is removed or powered off. You should close the serial terminal before plugging the badge back in, otherwise the serial terminal may not reconnect.&lt;br /&gt;
&lt;br /&gt;
== 5. Download some software you'll need ==&lt;br /&gt;
&lt;br /&gt;
You will be downloading some stuff now. It's probably be best if you create some folder somewhere so you don't end up with files all over your Desktop.&lt;br /&gt;
&lt;br /&gt;
Note you can copy files across from your computer to the badge, reset the badge and run the files though the menu, however these instructions make things a little easier.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
* Python: Go to https://www.python.org/downloads/ and download python version 3.x. After the download is finished you can install it.&lt;br /&gt;
* Go to https://bootstrap.pypa.io/get-pip.py and save the file into your folder&lt;br /&gt;
* Hold shift, right click on the folder on, and click &amp;quot;open command window here&amp;quot;&lt;br /&gt;
* Now type &amp;lt;code&amp;gt;python get-pip.py&amp;lt;/code&amp;gt;&lt;br /&gt;
* After the install was successful please type &amp;lt;code&amp;gt;pip install pyserial pyusb&amp;lt;/code&amp;gt; followed by Enter.&lt;br /&gt;
* If you do not wish to install python, and would rather copy files across, the command line utility RoboCopy is recommended. For example: &amp;lt;code&amp;gt;Robocopy.exe ./my_app/ d:/apps/my_app&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OSX / Linux ===&lt;br /&gt;
&lt;br /&gt;
* Python: Open a terminal and type &amp;lt;code&amp;gt;python --version&amp;lt;/code&amp;gt;. If you get a version number you're good to go, otherwise go to https://www.python.org/downloads/ and download Python version 3.x. After the download is finished you can install it.&lt;br /&gt;
* Go to https://bootstrap.pypa.io/get-pip.py and save the file into your folder&lt;br /&gt;
* Use a terminal to go to the folder you created ([http://www.macworld.com/article/2042378/master-the-command-line-navigating-files-and-folders.html this is how you do it]) and type &amp;lt;code&amp;gt;python get-pip.py&amp;lt;/code&amp;gt;&lt;br /&gt;
* Now type &amp;lt;code&amp;gt;python get-pip.py&amp;lt;/code&amp;gt;&lt;br /&gt;
* After the install was successful please type &amp;lt;code&amp;gt;pip install pyserial pyusb&amp;lt;/code&amp;gt; followed by Enter&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
* If you have problems install python, please use google, there are lots of good explanations out there&lt;br /&gt;
* For information about how to install &amp;lt;code&amp;gt;pip&amp;lt;/code&amp;gt; have a look here: https://pip.pypa.io/en/stable/installing/&lt;br /&gt;
&lt;br /&gt;
== 6. (Optional) Update your badge's micropython ==&lt;br /&gt;
'You can skip this step', but since TiLDA is still a work in progress, it's best to update regularly. So why not do it now? It's easy, just follow the instructions here: [[TiLDA_MK3/Firmware_Update]]&lt;br /&gt;
&lt;br /&gt;
== 5. Run a whole file of code ==&lt;br /&gt;
While you can do most things via the terminal like you just did, it's a bit easier to work on a file that you can edit. So let's do that. &lt;br /&gt;
* Go to https://raw.githubusercontent.com/emfcamp/micropython/tilda-master/tools/pyboard.py and use your browser to save it as &amp;quot;pyboard.py&amp;quot; into your newly created folder&lt;br /&gt;
* Open a text editor. On Windows you can search for &amp;lt;code&amp;gt;Notepad&amp;lt;/code&amp;gt;, on OSX there's one called &amp;lt;code&amp;gt;textedit&amp;lt;/code&amp;gt; and if you're on Linux you can probably find one by searching for &amp;quot;edit&amp;quot;. &lt;br /&gt;
* Copy the following and save it as &amp;lt;code&amp;gt;test.py&amp;lt;/code&amp;gt; in your folder:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print(1 + 2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Open a terminal, navigate to the right folder (see step 5 for more info) &lt;br /&gt;
** Windows: &amp;lt;code&amp;gt;python pyboard.py test.py --device=/COM4&amp;lt;/code&amp;gt;   Replace COM4 with whatever port your badge installed as.&lt;br /&gt;
** OSX: type &amp;lt;code&amp;gt;python pyboard.py test.py --device=/dev/tty.usbmodem*&amp;lt;/code&amp;gt;&lt;br /&gt;
** Linux: type &amp;lt;code&amp;gt;python pyboard.py test.py --device=/dev/ttyACM*&amp;lt;/code&amp;gt;&lt;br /&gt;
* You should now see the your terminal showing &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;. Your getting good at this!&lt;br /&gt;
&lt;br /&gt;
'''Hint''': If you don't want the home app to start every time you can create an empty &amp;lt;code&amp;gt;main.py&amp;lt;/code&amp;gt; file in the USB folder. This will stop the boot from loading the home screen and allow you do run code on your badge undisturbed. But remember to &amp;quot;safely eject&amp;quot; the badge after writing the file and to remove it again when you want the normal behaviour back&lt;br /&gt;
&lt;br /&gt;
== 7. Blink ==&lt;br /&gt;
So far all we've seen is the badge doing some maths and sending the result back via usb. Let's start with one of the simplest hardware device on the badge, a LED (which means &amp;quot;Light emitting diode&amp;quot;) -- We want to make it blink.&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;lt;code&amp;gt;blink.py&amp;lt;/code&amp;gt; and copy this bit of code into it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pyb&lt;br /&gt;
led = pyb.LED(1)&lt;br /&gt;
led.on()&lt;br /&gt;
pyb.delay(500)&lt;br /&gt;
led.off()&lt;br /&gt;
pyb.delay(500)&lt;br /&gt;
led.on()&lt;br /&gt;
pyb.delay(500)&lt;br /&gt;
led.off()&lt;br /&gt;
pyb.delay(500)&lt;br /&gt;
led.on()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save it and use a terminal to execute it (See Step 5 - but make sure to replace the filename in the command). Have a look at your badge, you should see the tiny LED labeled &amp;quot;A&amp;quot; (It's right between the B button and the screen) flash twice before and then staying on. &lt;br /&gt;
&lt;br /&gt;
Now, let's see what the code actually does. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pyb&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This line tells your badge to import the &amp;quot;pyb&amp;quot; library. It allows you to do various hardware related things with your badge (the full list is [http://docs.micropython.org/en/latest/pyboard/library/pyb.html here]). This is something very important in python, you always need to import libraries before you can use them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
led = pyb.LED(1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This line uses the pyb module we've just imported and creates a LED object. The &amp;quot;&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&amp;quot; means we're using the first LED on the badge. Change it to &amp;quot;&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&amp;quot;, save it and run pyboard.py again - Now the LED B should flash in green. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;led&amp;lt;/code&amp;gt; bit before the &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; means that we're not only creating an LED object, but we're also storing it for later use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
led.on()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Here we're using the reference to the LED object we've just created and calling the &amp;lt;code&amp;gt;.on()&amp;lt;/code&amp;gt; function on it. Most python objects have multiple functions you can use. In this case you can look the them up here: http://docs.micropython.org/en/latest/pyboard/library/pyb.LED.html?highlight=led&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pyb.delay(500)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This line uses the &amp;lt;code&amp;gt;pyb.delay()&amp;lt;/code&amp;gt; function to pause the execution of our program for a while. The &amp;lt;code&amp;gt;500&amp;lt;/code&amp;gt; is a number in milliseconds and the code is stopping for half a second. We need this delay to give your eyes some time to see that the LED has turned on. Try playing with different numbers or leaving the line out altogether to get a feeling for it.&lt;br /&gt;
&lt;br /&gt;
== 8. Blink forever ==&lt;br /&gt;
Since our original &amp;lt;code&amp;gt;blink.py&amp;lt;/code&amp;gt; script is only blinking twice it might be easy to miss. Let's fix this by blinking a bit longer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pyb&lt;br /&gt;
led = pyb.LED(1)&lt;br /&gt;
while True:&lt;br /&gt;
	led.toggle()&lt;br /&gt;
	pyb.delay(500)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be careful to make sure you're copying the spaces in front of the last two lines as well, they're very important in Python! If you want to type them you have to use the &amp;lt;code&amp;gt;Tab&amp;lt;/code&amp;gt; key on your keyboard - It's normally on the left of your keyboard, two keys above the &amp;lt;code&amp;gt;Shift&amp;lt;/code&amp;gt; key. &lt;br /&gt;
&lt;br /&gt;
Save this code and run it via &amp;lt;code&amp;gt;pyboard.py&amp;lt;/code&amp;gt; again. You should now see the red LED blinking forever.  So what's happening here?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
while True:&lt;br /&gt;
	led.toggle()&lt;br /&gt;
	pyb.delay(500)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is called a &amp;quot;while loop&amp;quot; in Python. It means that a certain bit of code (the one indented by the Tab at the beginning of the line) will be repeated over and over again until a certain condition is not fulfilled anymore. In this case the condition is &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt; which is the Python-way of saying &amp;quot;this is always correct&amp;quot;. Therefore the loop will repeat forever. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;led.toggle()&amp;lt;/code&amp;gt; is similar to &amp;lt;code&amp;gt;led.on()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;led.off()&amp;lt;/code&amp;gt;, but instead of always turning the LED on or off it switches between the states. Very useful in our case!&lt;br /&gt;
&lt;br /&gt;
This kind of &amp;quot;infinite loop&amp;quot; is quite useful for a lot of badge code, but often you also want to have some way of leaving the loop. Try this instead:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pyb&lt;br /&gt;
import buttons&lt;br /&gt;
buttons.init()&lt;br /&gt;
led = pyb.LED(1)&lt;br /&gt;
while not buttons.is_pressed(&amp;quot;BTN_MENU&amp;quot;):&lt;br /&gt;
	led.toggle()&lt;br /&gt;
	pyb.delay(500)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few new things here: First we have imported a new library called &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt;. This library helps you with all the buttons on the badge. If you want to use buttons in your script you also have to call &amp;lt;code&amp;gt;buttons.init()&amp;lt;/code&amp;gt;, so that's what we're doing in line 3.&lt;br /&gt;
&lt;br /&gt;
We have also changed the &amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt; loop with a new statement &amp;lt;code&amp;gt;not buttons.is_pressed(&amp;quot;BTN_MENU&amp;quot;)&amp;lt;/code&amp;gt;. Like I said above, &amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt; loops will go on forever while its condition is fulfilled. We have now changed the condition to be &amp;quot;while the MENU button is not pressed&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Try running the code. You will again get the same blinking LED, but this time you should be able to stop it by pressing the MENU button. &lt;br /&gt;
&lt;br /&gt;
== 8. Hello Screen ==&lt;br /&gt;
&lt;br /&gt;
Ok, now let's try to write something on the screen. TiLDA comes with a colour screen and we can use a library called UGFX to draw on it. &lt;br /&gt;
&lt;br /&gt;
Create a &amp;lt;code&amp;gt;main.py&amp;lt;/code&amp;gt; file and put this in there:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ugfx&lt;br /&gt;
import buttons&lt;br /&gt;
import pyb&lt;br /&gt;
&lt;br /&gt;
ugfx.init()&lt;br /&gt;
buttons.init()&lt;br /&gt;
ugfx.clear(ugfx.YELLOW)&lt;br /&gt;
&lt;br /&gt;
ugfx.text(5, 5, &amp;quot;Hello World&amp;quot;, ugfx.RED)&lt;br /&gt;
ugfx.fill_circle(100, 100, 30, ugfx.GREEN)&lt;br /&gt;
ugfx.fill_circle(200, 100, 30, ugfx.GREEN)&lt;br /&gt;
ugfx.area(80, 150, 140, 20, ugfx.GREEN)&lt;br /&gt;
ugfx.area(120, 170, 60, 20, ugfx.GREEN)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you run this file you should see a the screen turn yellow with some text and a (very simple) smiley. &lt;br /&gt;
&lt;br /&gt;
If you use the screen you have to make sure you're using &amp;lt;code&amp;gt;ugfx.init()&amp;lt;/code&amp;gt;, otherwise nothing will work. &amp;lt;code&amp;gt;ugfx.clear()&amp;lt;/code&amp;gt; is used to clear the screen (in this case with a special colour) and the next 5 lines are drawing some text and a few basic shapes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ugfx.text(x, y, text, color)&amp;lt;/code&amp;gt; Prints some text at position (x, y) in a given colour. x and y are coordinates on the screen. x=0 and y=0 means the top-left of the screen and x=320 y=240 is the bottom right corner. Try changing the two numbers and see how the text moves around on the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ugfx.fill_circle(x, y, radius, color)&amp;lt;/code&amp;gt; draws a circle on the screen. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ugfx.area(x, y, width, height, color)&amp;lt;/code&amp;gt; draws a rectangle on the screen. &lt;br /&gt;
&lt;br /&gt;
There are more basic drawing operations. You can find a list of them here: [[TiLDA MK3/ugfx|uGFX]]&lt;br /&gt;
&lt;br /&gt;
== 10. Your own app ==&lt;br /&gt;
&lt;br /&gt;
Having to have your badge connected to your computer all the time is a bit boring. Let's make it an app, so you can carry it around!&lt;br /&gt;
&lt;br /&gt;
Update your &amp;lt;code&amp;gt;main.py&amp;lt;/code&amp;gt; to look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
### Author: Your Name&lt;br /&gt;
### Description: Smiley!&lt;br /&gt;
### Category: Tutorial&lt;br /&gt;
### License: MIT&lt;br /&gt;
### Appname : Smiley&lt;br /&gt;
&lt;br /&gt;
import ugfx&lt;br /&gt;
import buttons&lt;br /&gt;
import pyb&lt;br /&gt;
&lt;br /&gt;
ugfx.init()&lt;br /&gt;
buttons.init()&lt;br /&gt;
ugfx.clear(ugfx.YELLOW)&lt;br /&gt;
&lt;br /&gt;
ugfx.text(5, 5, &amp;quot;Hello World&amp;quot;, ugfx.RED)&lt;br /&gt;
ugfx.fill_circle(100, 100, 30, ugfx.GREEN)&lt;br /&gt;
ugfx.fill_circle(200, 100, 30, ugfx.GREEN)&lt;br /&gt;
ugfx.area(80, 150, 140, 20, ugfx.GREEN)&lt;br /&gt;
ugfx.area(120, 170, 60, 20, ugfx.GREEN)&lt;br /&gt;
&lt;br /&gt;
while not buttons.is_pressed(&amp;quot;BTN_MENU&amp;quot;):&lt;br /&gt;
	pyb.wfi()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The bit at the top is a comment, it's not actually part of the code and python ignores it. It does however help us categorise the app. Make sure you update your name :)&lt;br /&gt;
&lt;br /&gt;
Plug your badge in and open the USB drive. Go into the &amp;quot;apps&amp;quot; folder and create a new folder called &amp;quot;hello_screen&amp;quot;. Copy your newly updated &amp;lt;code&amp;gt;main.py&amp;lt;/code&amp;gt; into there and safely eject the device. If you now press the reset button at the back of your badge it will restart normally. Wait until your name appears and press the MENU button. Go all the way to the bottom right and select &amp;quot;View all&amp;quot;. Now you have to press &amp;quot;right&amp;quot; until you find the &amp;quot;Smiley&amp;quot; app. Select it and press A - You should now see your smiley.&lt;br /&gt;
&lt;br /&gt;
== 11. Publish your app to the app library ==&lt;br /&gt;
&lt;br /&gt;
Now that you have your own smiley app, why not share it with others? &lt;br /&gt;
&lt;br /&gt;
Find your main.py and create an archive of it. Most operating systems have something build in for that purpose. In OSX you can right click and select &amp;quot;Compress main.py&amp;quot;, under Windows you can select &amp;quot;???&amp;quot; (someone please fill this) and under Linux you right click the files and use &amp;quot;Compress...&amp;quot;. You should now have a new file called &amp;lt;code&amp;gt;main.zip&amp;lt;/code&amp;gt; or similar. &lt;br /&gt;
&lt;br /&gt;
Go to http://api.badge.emfcamp.org/ and sign up with your email address and a password.  In the top right there's a field called &amp;quot;Create New App&amp;quot;  - Put &amp;quot;Smiley&amp;quot; into the field next to it and then click &amp;quot;Create&amp;quot;. On the next screen click the &amp;quot;Choose File&amp;quot; button and select your &amp;lt;code&amp;gt;main.zip&amp;lt;/code&amp;gt;. Now press &amp;quot;Upload&amp;quot; - and you're done!&lt;br /&gt;
&lt;br /&gt;
You now have to wait until we have reviewed your app to make sure it's not doing something weird and then we'll hit the &amp;quot;publish&amp;quot; button and everyone on the camp site will be able to download your newly created app to their badge. If we're not quick enough, feel free to come to the badge tent and we'll hurry the review up ;)&lt;br /&gt;
&lt;br /&gt;
= Alternative ways to work with TiLDA = &lt;br /&gt;
&lt;br /&gt;
All of the python code which runs on the badge can be modified on the mass storage device, and new apps can be added this way too. Be careful when using text editors to modify files on the device, if the mass storage is not 'safely removed' before removal, corruption of the file being edited can occur.&lt;br /&gt;
&lt;br /&gt;
When writing your own code, it is advised edit code on your computer, then copy it across to the badge, wait for the red 'writing' LED to go out, reset it, and run.&lt;br /&gt;
This way you don't need to worry about safely removing the badge each time.&lt;br /&gt;
&lt;br /&gt;
To interactively run code on the badge, a python REPL can be accessed via the virtual serial port. Once you have found the serial port, use your favourite serial terminal to connect to the badge. Since the badge will be running the main software, press Ctrl+c to stop it, and the badge will display '&amp;gt;&amp;gt;&amp;gt;' to indicate it is ready to receive commands.&lt;br /&gt;
&lt;br /&gt;
The badge runs micropython, and as a result does not contain everything you may expect from full python. See the micropython docs in the lniks below for more information.&lt;br /&gt;
The badge has additional APIs, in particular for the LCD, Wifi and IMU, which are also listed below.&lt;/div&gt;</summary>
		<author><name>Liedra</name></author>
	</entry>
	<entry>
		<id>https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3&amp;diff=201</id>
		<title>TiLDA MK3</title>
		<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3&amp;diff=201"/>
		<updated>2016-08-08T18:59:06Z</updated>

		<summary type="html">&lt;p&gt;Liedra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:TiLDA_MK3_front.jpg|right|500px|TiLDA Mkπ]]&lt;br /&gt;
&lt;br /&gt;
== Using your badge ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #FFFFDD; border: 1px solid #808000; padding: 5px;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;If you just got your badge and it doesn't do anything&amp;lt;/strong&amp;gt;, don't despair, quite a few of them need to be [[TiLDA_MK3/reset|factory reset]] before showing the loading screen. Press and hold &amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; while quickly pressing the reset button at the back. Keep the &amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; button hold for another 2 seconds while the green light on the front is blinking. Release it &amp;lt;i&amp;gt;while&amp;lt;/i&amp;gt; the green light is on.&amp;lt;br&amp;gt;If this doesn't work you can [[TiLDA_MK3/Firmware_Update|update the badge firmware]]. If this doesn't work, please come and join us in #tilda on [https://freenode.net/ Freenode IRC]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #DDFFFF; border: 1px solid #808000; padding: 5px;&amp;quot;&amp;gt;If you're having problems downloading some apps from the App Library &amp;lt;b&amp;gt;please update your badge via the App Library update option&amp;lt;/b&amp;gt;. After a restart it should work much smoother.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Assembly ===&lt;br /&gt;
With your badge you will receive a booklet explaining how it's done. If you have any problems, please come to the Badge Operation Center and we will help you.&lt;br /&gt;
&lt;br /&gt;
=== Basic usage ===&lt;br /&gt;
After you have assembled your badge you can just use the tiny switch at the bottom of the screen to turn your badge on. Alternatively you can use any USB power source. If you turn your badge on for the first time (or if for some reason it has reset itself) you will get some on-screen information while we try to download the newest set of software. &lt;br /&gt;
&lt;br /&gt;
If at any point you want to restart your badge you can just press the reset button at the back. &lt;br /&gt;
&lt;br /&gt;
==== Changing your name ====&lt;br /&gt;
&lt;br /&gt;
# Press 'Menu'&lt;br /&gt;
# Select the 'Change Name' app and press 'A'&lt;br /&gt;
# Use the joystick and 'A' key to enter your name&lt;br /&gt;
# Press 'Menu' to save your name and reset the badge - your name should now be displayed!&lt;br /&gt;
&lt;br /&gt;
==== Installing new apps ====&lt;br /&gt;
&lt;br /&gt;
# Press 'Menu'&lt;br /&gt;
# Select the 'App Library' app and press 'A'&lt;br /&gt;
# Select &amp;quot;Browse App Store&amp;quot;&lt;br /&gt;
# Select a category and then an app. Wait until you see the description and press &amp;quot;A&amp;quot; to save it.&lt;br /&gt;
# Press B a few times (or alternatively MENU) to restart your badge&lt;br /&gt;
# On the home screen you can now press MENU and select &amp;quot;View all&amp;quot; to find your newly installed app. If you want to pin it to the quick launcher screen select your app and press MENU. If you just want to start it press A instead.&lt;br /&gt;
&lt;br /&gt;
=== WiFi ===&lt;br /&gt;
Your TiLDA Badge has built-in wifi support. It should all just work if you're at the campsite, but if you're on your own network you might have to tell the badge about it. For more information please have a look here: [[TiLDA MK3/wifi|WiFi]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;A word of warning&amp;lt;/strong&amp;gt;: During EMF the badge will use &amp;quot;emf-insecure&amp;quot;. This is, as the name implies, not the most secure way of transmitting data. On top of that there are some problems with HTTPS and SSL, so we're not using it for with the default apps (we're working on it!). Please &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;don't send anything private or important to or from the badge via wifi&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Charging ===&lt;br /&gt;
The badge charges via a microUSB socket, and takes about 2-3 hours for a full charge. The red charge LED next to the USB connector will extinguish when charging is complete&lt;br /&gt;
&lt;br /&gt;
=== Nothing works! Help! ===&lt;br /&gt;
&lt;br /&gt;
Don't worry, you can always &amp;quot;factory reset&amp;quot; your badge. Please follow these instructions: [[TiLDA_MK3/reset|Resetting]]&lt;br /&gt;
&lt;br /&gt;
If everything else absolutely fails, you can try following these instructions (advanced): [[TiLDA_MK3/Firmware_Update]]&lt;br /&gt;
&lt;br /&gt;
== Hacking your badge ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[TiLDA_MK3/Introduction_to_badge_hacking|Badge Hacking Workshop Documentation]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the main goals of TiLDA is to make hacking it as easy as possible. All you need to do so is a computer with USB and your badge.&lt;br /&gt;
&lt;br /&gt;
* '''[[TiLDA MK3/Get Started|Step-by-step: How to get started]]''' &lt;br /&gt;
* '''[[TiLDA MK3/Run Code|3 Ways to run code on your TiLDA]]''' &lt;br /&gt;
* [[TiLDA MK3/App Store Submissions|App Store Submissions]]&lt;br /&gt;
&lt;br /&gt;
The badge itself runs code written in the computer language [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which is run by a bit of software called [https://micropython.org/ Micropython]. &lt;br /&gt;
&lt;br /&gt;
For more information about the functions available please have a look at the [[#Badge API|Badge API]] section of this page.&lt;br /&gt;
&lt;br /&gt;
If you're already familiar with all this you can jump right into the topic of Apps. Apps can be shared via the EMF App Library or by copying files of and on via USB. If you want to know more about how this works go to [[TiLDA MK3/apps]]&lt;br /&gt;
&lt;br /&gt;
In case you're more interested in what makes the hardware tick and your confident with C++ and microprocessors then you can work directly with the micropython code that runs TiLDA: [[TiLDA MK3/build|How to build the firmware from scratch]]&lt;br /&gt;
&lt;br /&gt;
All code used is hosted on Github. Contributions and PR are very welcome!&lt;br /&gt;
* https://github.com/emfcamp/micropython&lt;br /&gt;
* https://github.com/emfcamp/Mk3-Firmware&lt;br /&gt;
* https://github.com/emfcamp/Mk3-Server&lt;br /&gt;
&lt;br /&gt;
=== Some ideas ===&lt;br /&gt;
&lt;br /&gt;
[[TiLDA MK3/Ideas|Please share what you've done (or want to do) with others!]]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/emfcamp/Mk3-Hardware/blob/master/case-final.dxf Laser cut case files]&lt;br /&gt;
&lt;br /&gt;
== Badge API ==&lt;br /&gt;
&lt;br /&gt;
=== Build-in ===&lt;br /&gt;
* [http://docs.micropython.org/en/latest/pyboard/ documentation] - General Micropython libarary&lt;br /&gt;
* [[TiLDA MK3/ugfx|uGFX]] - The TiLDA LCD colour screen&lt;br /&gt;
* [[TiLDA MK3/documentation/cc3100|CC3100]] - The wifi chip&lt;br /&gt;
* [[TiLDA MK3/rtc|RTC]] (real time clock)&lt;br /&gt;
* [[TiLDA MK3/adc|ADC]] (analogue reading)&lt;br /&gt;
* [[TiLDA MK3/timer|Timer]]&lt;br /&gt;
* Microcontroller peripherals [https://micropython.org/doc/module/pyb/] (Timers, PWM, serial etc)&lt;br /&gt;
&lt;br /&gt;
=== TiLDA Libraries ===&lt;br /&gt;
On top of the build-in modules above we have also created a bunch of helpful libraries written in python. If you go through the bootstrap process or use the App Library you should always have a full set of those on your badge. If for some reason this isn't the case you can download our repository from https://github.com/emfcamp/Mk3-Firmware and copy the &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; folder onto your badge.&lt;br /&gt;
&lt;br /&gt;
TBD, for now please have a look at the libraries themselves: https://github.com/emfcamp/Mk3-Firmware/tree/master/lib&lt;br /&gt;
&lt;br /&gt;
* [[TiLDA MK3/lib/buttons|buttons]]&lt;br /&gt;
* database&lt;br /&gt;
* dialogs&lt;br /&gt;
* filesystem&lt;br /&gt;
* http_client&lt;br /&gt;
* imu&lt;br /&gt;
* wifi&lt;br /&gt;
* NTP Example: https://gist.github.com/drrk/4a17c4394f93d0f9123560af056f6f30&lt;br /&gt;
* On board LED &amp;quot;NeoPixel&amp;quot; example: https://github.com/mayhem/tilda-mk3-led-demo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(feel free to add additional ideas, and create links new wiki pages to on-going projects, perhaps someone will want to contribute)&lt;br /&gt;
&lt;br /&gt;
== Badge hardware ==&lt;br /&gt;
TiLDA comes with a long list of very useful hardware. Some might be obvious, but some are a bit hidden. &lt;br /&gt;
* Colour LCD screen 320x240&lt;br /&gt;
* Joystick and A/B/Menu Buttons&lt;br /&gt;
* Wifi (cc3100)&lt;br /&gt;
* Accelerometer&lt;br /&gt;
* Compass&lt;br /&gt;
* Buzzer&lt;br /&gt;
* Battery&lt;br /&gt;
* &amp;lt;s&amp;gt;WS2812B aka &amp;quot;Neo Pixel&amp;quot;&amp;lt;/s&amp;gt; on port PB13. [https://badge.emfcamp.org/wiki/TiLDA_MK3/How_to_fix_NeoPixel Sadly defunct]&lt;br /&gt;
* MicroSD slot&lt;br /&gt;
&lt;br /&gt;
NOTE: The WS2812B is actually on pin PB13, not X2 as shown below!&lt;br /&gt;
&lt;br /&gt;
[[File:pinout-1.png | 500px]] [[File:pinout2-1.png | 500px]]&lt;/div&gt;</summary>
		<author><name>Liedra</name></author>
	</entry>
	<entry>
		<id>https://badge.emfcamp.org/w/index.php?title=User:Liedra&amp;diff=200</id>
		<title>User:Liedra</title>
		<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/w/index.php?title=User:Liedra&amp;diff=200"/>
		<updated>2016-08-08T18:52:19Z</updated>

		<summary type="html">&lt;p&gt;Liedra: Created page with &amp;quot;Hi!  I am blindly hacking my way through all of this stuff and try to make things easier for newbies.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi!&lt;br /&gt;
&lt;br /&gt;
I am blindly hacking my way through all of this stuff and try to make things easier for newbies.&lt;/div&gt;</summary>
		<author><name>Liedra</name></author>
	</entry>
	<entry>
		<id>https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Firmware_Update&amp;diff=198</id>
		<title>TiLDA MK3/Firmware Update</title>
		<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Firmware_Update&amp;diff=198"/>
		<updated>2016-08-08T18:32:55Z</updated>

		<summary type="html">&lt;p&gt;Liedra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Update your Tilda Mk3==&lt;br /&gt;
&lt;br /&gt;
This websites will help you to update your Tilda Mk3 badge. But be careful, following these instructions will delete all files and setting on your badge, so make sure you have copies of everything!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before you start==&lt;br /&gt;
&lt;br /&gt;
You need to put your badge into DFU mode. To do this please press down the joystick button in the center while at the same time quickly pushing the reset button at the back. You're now ready to update your badge.&lt;br /&gt;
&lt;br /&gt;
==OSX==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites needed for Mac OS X'''&lt;br /&gt;
&lt;br /&gt;
1. XCode (from App Store)&lt;br /&gt;
&lt;br /&gt;
2. [http://docs.python-guide.org/en/latest/starting/install/osx/ Homebrew and Pip]&lt;br /&gt;
&lt;br /&gt;
3. You then need to (from the terminal) use homebrew to install libusb &amp;lt;code&amp;gt;brew install libusb&amp;lt;/code&amp;gt; and pip to install libusb1 and pyusb &amp;lt;code&amp;gt;pip install libusb1 pyusb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. You should be good to go! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open a terminal and execute this line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;curl --silent --show-error --retry 5 https://update.badge.emfcamp.org/update.py | python&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open a terminal and execute this line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;curl --silent --show-error --retry 5 https://update.badge.emfcamp.org/update.py | python&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Operating systems==&lt;br /&gt;
&lt;br /&gt;
To update your badge please download the following script and run it via python: [https://update.badge.emfcamp.org/update.py update.py]&lt;br /&gt;
&lt;br /&gt;
If you know how to flash the badge yourself you can also download the DFU binary directly: [https://update.badge.emfcamp.org/firmware.dfu firmware.dfu]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build your own version==&lt;br /&gt;
&lt;br /&gt;
If you want to build your own version of the firmware have a look [https://badge.emfcamp.org/wiki/TiLDA_MK3/build here]&lt;/div&gt;</summary>
		<author><name>Liedra</name></author>
	</entry>
	<entry>
		<id>https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Firmware_Update&amp;diff=197</id>
		<title>TiLDA MK3/Firmware Update</title>
		<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3/Firmware_Update&amp;diff=197"/>
		<updated>2016-08-08T18:31:09Z</updated>

		<summary type="html">&lt;p&gt;Liedra: Created page with &amp;quot;   == Update your Tilda Mk3==  This websites will help you to update your Tilda Mk3 badge. But be careful, following these instructions will delete all files and setting on yo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Update your Tilda Mk3==&lt;br /&gt;
&lt;br /&gt;
This websites will help you to update your Tilda Mk3 badge. But be careful, following these instructions will delete all files and setting on your badge, so make sure you have copies of everything!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before you start==&lt;br /&gt;
&lt;br /&gt;
You need to put your badge into DFU mode. To do this please press down the joystick button in the center while at the same time quickly pushing the reset button at the back. You're now ready to update your badge.&lt;br /&gt;
&lt;br /&gt;
==OSX==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites needed for Mac OS X'''&lt;br /&gt;
&lt;br /&gt;
1. XCode (from App Store)&lt;br /&gt;
&lt;br /&gt;
2. [http://docs.python-guide.org/en/latest/starting/install/osx/ Homebrew and Pip]&lt;br /&gt;
&lt;br /&gt;
3. You then need to (from the terminal) use homebrew to install libusb &amp;lt;code&amp;gt;brew install libusb&amp;lt;/code&amp;gt; and pip to install libusb1 and pyusb &amp;lt;code&amp;gt;pip install libusb1 pyusb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. You should be good to go! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open a terminal and execute this line:&lt;br /&gt;
&lt;br /&gt;
curl --silent --show-error --retry 5 https://update.badge.emfcamp.org/update.py | python&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open a terminal and execute this line:&lt;br /&gt;
&lt;br /&gt;
curl --silent --show-error --retry 5 https://update.badge.emfcamp.org/update.py | python&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Operating systems==&lt;br /&gt;
&lt;br /&gt;
To update your badge please download the following script and run it via python: update.py&lt;br /&gt;
&lt;br /&gt;
If you know how to flash the badge yourself you can also download the DFU binary directly: firmware.dfu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build your own version==&lt;br /&gt;
&lt;br /&gt;
If you want to build your own version of the firmware have a look [https://badge.emfcamp.org/wiki/TiLDA_MK3/build here]&lt;/div&gt;</summary>
		<author><name>Liedra</name></author>
	</entry>
	<entry>
		<id>https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3&amp;diff=196</id>
		<title>TiLDA MK3</title>
		<link rel="alternate" type="text/html" href="https://badge.emfcamp.org/w/index.php?title=TiLDA_MK3&amp;diff=196"/>
		<updated>2016-08-08T18:21:02Z</updated>

		<summary type="html">&lt;p&gt;Liedra: /* Nothing works! Help! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:TiLDA_MK3_front.jpg|right|500px|TiLDA Mkπ]]&lt;br /&gt;
&lt;br /&gt;
== Using your badge ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #FFFFDD; border: 1px solid #808000; padding: 5px;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;If you just got your badge and it doesn't do anything&amp;lt;/strong&amp;gt;, don't despair, quite a few of them need to be [[TiLDA_MK3/reset|factory reset]] before showing the loading screen. Press and hold &amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; while quickly pressing the reset button at the back. Keep the &amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; button hold for another 2 seconds while the green light on the front is blinking. Release it &amp;lt;i&amp;gt;while&amp;lt;/i&amp;gt; the green light is on.&amp;lt;br&amp;gt;If this doesn't work you can [https://update.badge.emfcamp.org/ update the badge firmware]. If this doesn't work, please come and see us at the badge tent&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #DDFFFF; border: 1px solid #808000; padding: 5px;&amp;quot;&amp;gt;If you're having problems downloading some apps from the App Library &amp;lt;b&amp;gt;please update your badge via the App Library update option&amp;lt;/b&amp;gt;. After a restart it should work much smoother.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Assembly ===&lt;br /&gt;
With your badge you will receive a booklet explaining how it's done. If you have any problems, please come to the Badge Operation Center and we will help you.&lt;br /&gt;
&lt;br /&gt;
=== Basic usage ===&lt;br /&gt;
After you have assembled your badge you can just use the tiny switch at the bottom of the screen to turn your badge on. Alternatively you can use any USB power source. If you turn your badge on for the first time (or if for some reason it has reset itself) you will get some on-screen information while we try to download the newest set of software. &lt;br /&gt;
&lt;br /&gt;
If at any point you want to restart your badge you can just press the reset button at the back. &lt;br /&gt;
&lt;br /&gt;
==== Changing your name ====&lt;br /&gt;
&lt;br /&gt;
# Press 'Menu'&lt;br /&gt;
# Select the 'Change Name' app and press 'A'&lt;br /&gt;
# Use the joystick and 'A' key to enter your name&lt;br /&gt;
# Press 'Menu' to save your name and reset the badge - your name should now be displayed!&lt;br /&gt;
&lt;br /&gt;
==== Installing new apps ====&lt;br /&gt;
&lt;br /&gt;
# Press 'Menu'&lt;br /&gt;
# Select the 'App Library' app and press 'A'&lt;br /&gt;
# Select &amp;quot;Browse App Store&amp;quot;&lt;br /&gt;
# Select a category and then an app. Wait until you see the description and press &amp;quot;A&amp;quot; to save it.&lt;br /&gt;
# Press B a few times (or alternatively MENU) to restart your badge&lt;br /&gt;
# On the home screen you can now press MENU and select &amp;quot;View all&amp;quot; to find your newly installed app. If you want to pin it to the quick launcher screen select your app and press MENU. If you just want to start it press A instead.&lt;br /&gt;
&lt;br /&gt;
=== WiFi ===&lt;br /&gt;
Your TiLDA Badge has built-in wifi support. It should all just work if you're at the campsite, but if you're on your own network you might have to tell the badge about it. For more information please have a look here: [[TiLDA MK3/wifi|WiFi]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;A word of warning&amp;lt;/strong&amp;gt;: During EMF the badge will use &amp;quot;emf-insecure&amp;quot;. This is, as the name implies, not the most secure way of transmitting data. On top of that there are some problems with HTTPS and SSL, so we're not using it for with the default apps (we're working on it!). Please &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;don't send anything private or important to or from the badge via wifi&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Charging ===&lt;br /&gt;
The badge charges via a microUSB socket, and takes about 2-3 hours for a full charge. The red charge LED next to the USB connector will extinguish when charging is complete&lt;br /&gt;
&lt;br /&gt;
=== Nothing works! Help! ===&lt;br /&gt;
&lt;br /&gt;
Don't worry, you can always &amp;quot;factory reset&amp;quot; your badge. Please follow these instructions: [[TiLDA_MK3/reset|Resetting]]&lt;br /&gt;
&lt;br /&gt;
If everything else absolutely fails, you can try following these instructions (advanced): [[TiLDA_MK3/Firmware_Update]]&lt;br /&gt;
&lt;br /&gt;
== Hacking your badge ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[[TiLDA_MK3/Introduction_to_badge_hacking|Badge Hacking Workshop Documentation]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the main goals of TiLDA is to make hacking it as easy as possible. All you need to do so is a computer with USB and your badge.&lt;br /&gt;
&lt;br /&gt;
* '''[[TiLDA MK3/Get Started|Step-by-step: How to get started]]''' &lt;br /&gt;
* '''[[TiLDA MK3/Run Code|3 Ways to run code on your TiLDA]]''' &lt;br /&gt;
* [[TiLDA MK3/App Store Submissions|App Store Submissions]]&lt;br /&gt;
&lt;br /&gt;
The badge itself runs code written in the computer language [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which is run by a bit of software called [https://micropython.org/ Micropython]. &lt;br /&gt;
&lt;br /&gt;
For more information about the functions available please have a look at the [[#Badge API|Badge API]] section of this page.&lt;br /&gt;
&lt;br /&gt;
If you're already familiar with all this you can jump right into the topic of Apps. Apps can be shared via the EMF App Library or by copying files of and on via USB. If you want to know more about how this works go to [[TiLDA MK3/apps]]&lt;br /&gt;
&lt;br /&gt;
In case you're more interested in what makes the hardware tick and your confident with C++ and microprocessors then you can work directly with the micropython code that runs TiLDA: [[TiLDA MK3/build|How to build the firmware from scratch]]&lt;br /&gt;
&lt;br /&gt;
All code used is hosted on Github. Contributions and PR are very welcome!&lt;br /&gt;
* https://github.com/emfcamp/micropython&lt;br /&gt;
* https://github.com/emfcamp/Mk3-Firmware&lt;br /&gt;
* https://github.com/emfcamp/Mk3-Server&lt;br /&gt;
&lt;br /&gt;
=== Some ideas ===&lt;br /&gt;
&lt;br /&gt;
[[TiLDA MK3/Ideas|Please share what you've done (or want to do) with others!]]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/emfcamp/Mk3-Hardware/blob/master/case-final.dxf Laser cut case files]&lt;br /&gt;
&lt;br /&gt;
== Badge API ==&lt;br /&gt;
&lt;br /&gt;
=== Build-in ===&lt;br /&gt;
* [http://docs.micropython.org/en/latest/pyboard/ documentation] - General Micropython libarary&lt;br /&gt;
* [[TiLDA MK3/ugfx|uGFX]] - The TiLDA LCD colour screen&lt;br /&gt;
* [[TiLDA MK3/documentation/cc3100|CC3100]] - The wifi chip&lt;br /&gt;
* [[TiLDA MK3/rtc|RTC]] (real time clock)&lt;br /&gt;
* [[TiLDA MK3/adc|ADC]] (analogue reading)&lt;br /&gt;
* [[TiLDA MK3/timer|Timer]]&lt;br /&gt;
* Microcontroller peripherals [https://micropython.org/doc/module/pyb/] (Timers, PWM, serial etc)&lt;br /&gt;
&lt;br /&gt;
=== TiLDA Libraries ===&lt;br /&gt;
On top of the build-in modules above we have also created a bunch of helpful libraries written in python. If you go through the bootstrap process or use the App Library you should always have a full set of those on your badge. If for some reason this isn't the case you can download our repository from https://github.com/emfcamp/Mk3-Firmware and copy the &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; folder onto your badge.&lt;br /&gt;
&lt;br /&gt;
TBD, for now please have a look at the libraries themselves: https://github.com/emfcamp/Mk3-Firmware/tree/master/lib&lt;br /&gt;
&lt;br /&gt;
* [[TiLDA MK3/lib/buttons|buttons]]&lt;br /&gt;
* database&lt;br /&gt;
* dialogs&lt;br /&gt;
* filesystem&lt;br /&gt;
* http_client&lt;br /&gt;
* imu&lt;br /&gt;
* wifi&lt;br /&gt;
* NTP Example: https://gist.github.com/drrk/4a17c4394f93d0f9123560af056f6f30&lt;br /&gt;
* On board LED &amp;quot;NeoPixel&amp;quot; example: https://github.com/mayhem/tilda-mk3-led-demo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(feel free to add additional ideas, and create links new wiki pages to on-going projects, perhaps someone will want to contribute)&lt;br /&gt;
&lt;br /&gt;
== Badge hardware ==&lt;br /&gt;
TiLDA comes with a long list of very useful hardware. Some might be obvious, but some are a bit hidden. &lt;br /&gt;
* Colour LCD screen 320x240&lt;br /&gt;
* Joystick and A/B/Menu Buttons&lt;br /&gt;
* Wifi (cc3100)&lt;br /&gt;
* Accelerometer&lt;br /&gt;
* Compass&lt;br /&gt;
* Buzzer&lt;br /&gt;
* Battery&lt;br /&gt;
* &amp;lt;s&amp;gt;WS2812B aka &amp;quot;Neo Pixel&amp;quot;&amp;lt;/s&amp;gt; on port PB13. [https://badge.emfcamp.org/wiki/TiLDA_MK3/How_to_fix_NeoPixel Sadly defunct]&lt;br /&gt;
* MicroSD slot&lt;br /&gt;
&lt;br /&gt;
NOTE: The WS2812B is actually on pin PB13, not X2 as shown below!&lt;br /&gt;
&lt;br /&gt;
[[File:pinout-1.png | 500px]] [[File:pinout2-1.png | 500px]]&lt;/div&gt;</summary>
		<author><name>Liedra</name></author>
	</entry>
</feed>