Getting started with BBC Micro:bit

I have finally found time to play with my BBC micro:bit computer.

The micro:bit computer is an embedded computer given away by the BBC and comprises of an ARM processor, 25 LED matrix, accelerometer, and two input buttons.  It has Bluetooth support and connects to your PC for programming although it can also be powered by an external battery.  You need to plug it in through USB to program it through the micro:bit website.

Micro:bit connected to PC through USB showing the 25 LED programmable matrix.

In my first attempt at coding for the micro:bit I have created a program that lets you find the temperature by pressing button A, and the relative light level by pressing button B. Pressing both buttons at the same time shows a (somewhat disappointing) bar graph of the current temperature.

Source code.

I've used Microsoft Block Editor to write this code to keep things simple.  Micro bit can also be programmed in Python.  Ultimately you code needs to be compiled into object code to run on the micro:bit, but the website at handles all of this for you.

My second program is a counting ticker, useful next time you are herding sheep and need to count them back into their pen. Press button A to add one to the total.  Press B to deduct one from the total.  Shake the device to reset to zero (this is actually very easy to do by mistake).  Press both buttons to show the current count total.

Source code.

Program number 2.
That's all I have achieved for now, but I look forward to experimenting with some more challenging programs in the future.  I think I will look into the Bluetooth capabilities or research other devices that can connect with it.

In summary, the micro:bit is a fun device, although it does not compare well to the SenseHat for Raspberry Pi, or the original BBC microcomputer.  SenseHat with Raspberry Pi can pretty much do everything that the micro:bit can do with the added advantage of a much larger LED matrix (and a few extra sensors thrown in), and the BBC microcomputer is, of course, legendary.

Staying with us? Good, then you might like these varied posts on the Raspberry Pi computer, or the BBC Microcomputer.