Now the BBC MicroBit starts to make sense

BBC MicroBit
Behold, the world’s shortest USB lead!

Today, after much moaning on my part about delays, I got our school’s 3 teacher BBC MicroBits. And I think I now know how I’m going to use them once we get the children’s boards.

We’ve already done some Python in Year 7, so I am reluctant to start teaching them a different language or paradigm at this point – I feel we’ve moved beyond blocks. I also have to soothe concerns about children working on the public internet, and I dislike the way the current TouchDevelop and block editors rely on internet access and a remote server being online to compile your code. [UPDATE: You can use TouchDevelop and block editors without a login and without internet access, although you will need it to load the compiler in a browser in the first instance. See https://www.microbit.co.uk/offline for details. I am grateful to Miles Berry and Peli de Halleux for clarifying this for me.]

BBC MicroBit

I think Mu answers all of these questions for me. It’s the work of Nicholas Tollervy and others in the Python community – a standalone, cross-platform Python editor and command line tool that… just works!

Install Mu Micropython (I used a MacBook), plug in your MicroBit, start typing your Python code, press the Flash button – and the code runs on your MicroBit!

These very few lines of code do some cool things, and show off how the library of built-in images and tunes mean that children can do fun stuff with Python and the MicroBit amazingly quickly.

if button_a.is_pressed():
    display.show(Image.PACMAN)

draws a Pacman if you press the left button. There are LOADS of really fun built-in images to try.

if button_b.is_pressed():
    music.play(music.NYAN)

plays Nyan Cat music (many other tunes are available) if you press the right button. I attached a speaker with 2 crocodile clip leads from a MakeyMakey – no soldering required!

BBC MicroBit

if accelerometer.was_gesture('shake'):
    display.show(Image.GHOST)

Shake it and a ghost appears!

if pin1.is_touched():
    display.show(Image.SURPRISED)

Touch pin 1 (in a MakeyMakey way) and a surprised face lights up the screen.

Having forgotten (and now remembered) how really counter-intuitive the navigation is on the official MicroBit TouchDevelop lessons (and having to unlock my Microsoft account for some odd reason), I can honestly say I think using Python with Mu will be simpler than using block coding. It’s totally offline! No logins! No internet safety concerns. And it’s fun!

If you don’t have access to the command line (REPL) – as I currently don’t on my school Windows laptop – you get useful feedback in the form of error messages scrolling across the MicroBit display. Genius!

Mu for Windows - no drivers installed

Mu for Windows - no drivers needed for flashing code

Of course it remains to be seen if it will work on our Windows VDI (virtual desktops) at school, but I think I have seen the future of the MicroBit. And it’s snaky…

You can read the documentation for MicroBit MicroPython here: https://microbit-micropython.readthedocs.org/en/latest/ and download Mu here: https://github.com/ntoll/mu

BBC MicroBit

Running MicroBit self-contained off USB battery (above), and Kindle charger (below)

BBC MicroBit

This entry was posted in computers, education and tagged , , , . Bookmark the permalink.

2 Responses to Now the BBC MicroBit starts to make sense

  1. Rob says:

    Thanks – helped me!

  2. phil says:

    I had nothing but problems getting Mu working on linux mint (a ubuntu clone). I followed this post here mu on ubuntu

Leave a Reply