1. Getting Started¶
Mu is a beginners-oriented python code editor that has been built with lots of feedback from teachers and learners throughout the time. A supported board on the Mu editor is the BBC microbit board for which we have created a tailored firmware (based on the MicroPython project) that includes the modules documented here. The BBC microbit in turn, gets plugged into the GiggleBot.
The following sections will direct you to setting up the GiggleBot firmware on the BBC microbit and thus be able to program it with the Mu editor. At the end of these short instructions, you will be able to run the following snippet of code that lights up the eye LEDs on the GiggleBot.
from microbit import * from gigglebot import * # initialize the neopixels on the GiggleBot init() while True: set_eyes() # set GiggleBot eyes to blue (by default) sleep(250) # wait 250 msec pixels_off() # turn off the GiggleBot eyes sleep(250) # wait 250 msec
1.1. Downloading the Firmware¶
The 1st option in downloading the firmware is to visit the direct link placed in here and download the afferent file. Make sure you download it as a
To download the current version v0.4.0 corresponding to this documentation, click here.
1.2. Downloading the Modules¶
Apart from being able to download the firmware, the
.mpy modules can also be downloaded. And just like with the firmware,
you can either download the modules from the release page or by accessing the following direct links for version v0.4.0:
gigglebot.py, distance_sensor.py, thp.py, lightcolor.py,
You can also check this artifact explorer here.
Downloading the modules when the GiggleBot MicroPython Firmware is used is redundant. Use the modules (the
py modules) when you are using the basic
version of micropython. And in that case, not all
py modules will work - for that check this section and see how you can pair the modules to fit on a basic firmware.
1.3. Flashing the Firmware¶
Flashing the firmware is a breeze. Connect the BBC microbit to your laptop, wait until the MICROBIT filesystem appears and then copy-paste the GiggleBot firmware you just downloaded to the microbit.
After flashing the firmware, you will be able to import all modules listed in this documentation.
1.4. Custom Firmware in the Mu Editor¶
The Mu Editor comes with a default firmware for the microbit that can be overridden with the GiggleBot firmware instead. All that has to be done is to press on the gear wheel on the right hand side of the editor, then go to BBC micro:bit Settings and lastly, copy paste the path to the custom firmware (or runtime as the Mu editor likes to call).