Friday 29 July 2016

Using MicroPython on the micro:bit

MicroPython on the micro:bit is a great language. It may be a cut down version of Python 3 - missing many of the libraries that ship with the full-sized version of Python and some that are included are cut down somewhat - but it's a prefect match to the micro:bit. The only real problems that I've found so far revolve around using the BBC's online editor. It's good for what it is (getting you started) but three big limitations hit quite quickly:
  • Flashing programs to the micro:bit is awkward. First you download the hex file from your browser, find where the browser stored it, open up the micro:bit drive, then you drag it to the micro:bit drive. Far too many steps.
  • Program errors are almost comically hard to trace as the micro:bit slowly scrolls the error messages across its tiny display.
  • Python programs are best developed in combination with access to the command line (which Python calls a REPL). This allows you to try out commands and snippets of code without having to write a test program. If you've ever used BASIC on an old computer - that essentially what the REPL gives you. The default micro:bit IDE does not give you any way to access the REPL.
Luckily, there is a solution that solves all of these problems in a snip: Mu.

Wednesday 27 July 2016

Arrival

By mid-July it looked like the micro:bit should be available to buy, but every online shop was still showing them as out of stock. After a bit of a hunt, I found that Pimoroni showed them as available to order. Being of the slightly suspicious type I sent them a message and quite quickly the reply came back "yes, we actually got them in stock". Brilliant! I hurriedly placed the order.

A couple of days later a package arrived at our house. Nice work Pimoroni! Son saw the package first (what with me being at work and him being at home on school holiday) and guessed that there was a micro:bit inside.


Monday 25 July 2016

Begin at the Beginning


I can't remember when we first heard about the BBC miro:bit, but it filled us both with excitement. I'm a software engineer who also dabbles in electronics, and Son is a school kid who likes to program in Scratch and who is also becoming interested in electronics. I wanted an to find an interesting platform that we could both to learn together. My wish list was something like: