Distributed BBC micro:bit Clock

IMG_0619The idea for this project came from a tweet by David Whale [@whaleygeek] showing a font he had come up with for the micro:bit that managed to squeeze 2 digits on to the 5×5 led display. I have taken initial clock code he wrote and added functionality to read a Real Time Clock module connected via the I2C port together together with some other bits.

The time display is spread over 3 microbits [ 2 if you don’t want seconds ], these communicate using the radio function in micropython . You can also have a single micro:bit with a scrolling display. There is no limit to the number of slave micro:bits, but do only connect the RTC to a single micro:bit.IMG_0581

The clever bit, [well I think it it is !] is that all the micro:bit’s all run exactly the same code. You configure the display to hours / minutes / seconds or scrolling by connecting the P0-3 lines high. The software automatically identifies if it has the RTC connected to it and if so makes it’self the master synchronizing the other micro:bits every minute.

The whole thing is written in micro-python programmed using MU running on a Raspberry Pi. You can find instructions on how to install the latest version of MU in the micro:bit section of my site.  The code listing is commented so you can sort out which bit does what. If you want to change to code it is worth noting that it basically maxes out the available micro:bit memory as it stands.

IMG_0620Hardware, it is really up to you, I have used small ‘maker’ interface boards I got made to up allow me to mount the micro:bits vertically on a bit 0.1″ matrix board, but you can easily use one of the commercially available breakout boards. The RTC is a DS3231 RTC module. The only other bit I added was a simple 3.3volt PSU using a 78L33 and microUSB adapter board.IMG_0587(1)

if you don’t want to build the power supply you can simply power one of the micro:bits from it’s battery or micro:USB connection and it will feed the others and RTC.

You can download the micropython code and also a basic schematic showing how I connected all the bits from my GitHub https://github.com/DavidMS51/whaley_clock .  (Do make sure you download the latest version of the code)

There is also a short YouTube video of the clock here


About davidms49

Hobbyist / designer focussing on projects using RaspberryPi and more recently Retro 8bit processors
This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to Distributed BBC micro:bit Clock

  1. Pingback: BBC micro:bit Scrolling display | The Meandering Pi and Friends

Comments are closed.