Play with micro:bit and Small Basic


BBC micro:bit is a small board computer for kids.   Today I'd like to introduce two programs that communicate between a micro:bit and a PC.

The micro:bit side program is thermometer which is programed with JavaScript Blocks Editor.  This program shows temperature at A button clicked and sends temperature to serial port when the temperature changed.

Screen shot of makecode.microbit.org

The PC side program is Thermometer.sb which receives temperature from serial port and shows it graphically.  The picture below shows Device Manager, Thermometer.sb and chibi:bit (a micro:bit compatible board).

Photo of a PC and chibi:bit

Before running Thermometer.sb, please check the port number in Ports (COM & LPT) such like COM3 with Device Manager.  And modify line 88 of Thermometer.sb.  Then push reset button and push A button of micro:bit.

Have fun with Small Basic and micro:bit!

See Also

Comments (1)

  1. Great blog post, Nonki! This is exactly what we’re looking for. Ways to integrate with micro:bit!

    For everyone else, please check out Nonki’s forum thread for a lot more ideas: https://social.msdn.microsoft.com/Forums/en-US/0a6e1323-993c-4378-a181-2d08d45374df/small-basic-with-microbit?forum=smallbasic

Skip to main content