TiLDA MK3/Get Started

From EMF Badge
Revision as of 20:22, 25 July 2016 by Marekventur (talk | contribs) (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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. 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. This way you don't need to worry about safely removing the badge each time. If something goes wrong, the badge can be reset to its out-of-the-box state, so do not be concerned about breaking anything.

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.