TiLDA MK3: Difference between revisions

From EMF Badge
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
== Using your badge ==
== Using your badge ==


- Explaining buttons
- Battery
- Hardware
== Hacking your badge ==
- [[TiLDA MK3/apps|How to create and publish apps]]


=== Loading new apps ===
=== Loading new apps ===

Revision as of 12:01, 23 July 2016

Using your badge

- Explaining buttons - Battery - Hardware

Hacking your badge

- How to create and publish apps

Loading new apps

Charging

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


Hacking your badge

Upon connecting the badge to a computer, it should appear as a mass storage device, and a virtual serial port. Windows will require a driver file for the serial port, which is stored on the badge's mass storage. See here for full instructions.

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. If something goes wrong, the badge can be reset to its out-of-the-box state, so do not be concerned about breaking anything (although you may want copies of any code you are editing on your computer, in case something goes wrong)

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 '>>>' to indicate it is ready to receive commands.

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. The badge has additional APIs, in particular for the LCD, Wifi and IMU, which are also listed below.


How to build the firmware from scratch

Badge API

See the following links for help and examples

- Microcontroller peripherals [1] (Timers, PWM, serial etc)

- uGFX (screen library)

- RTC (real time clock)

Some ideas

- IRC relay

(feel free to add additional ideas, and create links new wiki pages to on-going projects, perhaps someone will want to contribute)

Badge hardware