Make: micro:bit shiny belt

This week I am going to Makersphere at St Mary Magdalen’s Catholic Primary School run by the amazing Lara Lowe and Jan Clemo, two teaching assistants at the school who (amongst many other things) run an after school coding club. Find them on twitter:

I am running a micro:bit workshop and have decided to make a micro:bit shiny belt that my workshop participants will be able to change the colour of by sending it radio messages.

This is the finished result!

Note on terminology:

Neopixel is a brand name by Adafruit. I haven’t used Adafruit neopixels, I used WS2812B RGB lights. I have used the Neopixel library on the micro:bit make website.


Create a belt that

  1. I could open and escape from (toilet!)
  2. Is mobile and therefore could be powered by batteries
  3. Could be controlled by a micro:bit
  4. The main brains would fit in my pocket


  1. WS2812B RGB strip of lights, long enough to wrap around your waist and overlap slightly. I used part of this strip: MENGCORE® 4M 5V 60Leds/M 240pixels programmable WS2812B RGB 5050 LED strip Individually addressable dream color Waterproof IP67 PCB Black
  2. Terminal blocks x 3
  3. Male to female jumper wire x 2
  4. 3 x AA battery box for the neopixels
  5. 2 x AAA battery box with JST connection for the micro:bit
  6. micro:bit x 1
  7. micro:bit edge connector x 1 (optional)


Thanks to David Whale this project was possible to do using batteries. Initially I tried using a 5V USB battery pack. But after asking Twitter for advice David came to the rescue and showed me I needed to a) ground the micro:bit with the neopixels and b) have similar power going to the neopixels and the micro:bit. The micro:bit’s out pins don’t produce enough power to control neopixels that are being powered by 5V. So I brought the neopixels power down to 4.5V by using 3xAA batteries to power them.


My light strip came with handy connectors like so:


This solves requirement 1 of having a detachable point to the belt. I can escape without pulling out batteries!

  1. Strip the connectors to get some bare wire
  2. Insert the wire into 3 terminal blocks. Screw down the blocks on each wire 20170709_201745
  3. Insert the micro:bit into a breakout board (edge connector)
  4. Connect the female end of a female-to-male jumper wire to Pin 1 on the edge connector
  5. Screw the male end of the jumper wire to the Din connection on the terminal block 20170709_202020
  6. NOTE: You don’t need the edge connector. You could strip the end of the jumper wire and poke the frayed wire through the pins in the micro:bit, sticking them on with cellotape. See my bracelet project where I did just that (link to come)
  7. Connect the red wire from the AA battery pack to the 5V wire in the terminal block 20170709_202122
  8. Connect the female end of a jumper wire to 0V on the edge connector
  9. Chop off the other end of the jumper wire and strip it to expose the wire
  10. Now we’re connecting three wires together: to the final ground wire in the terminal block connect the ground from the micro:bit (0V on the edge connector) and the ground (black wire) of the AA battery box20170709_202702.jpg
  11. A close up of the terminal block:20170709_202708
  12. Plug the AAA battery holder into the JST connector of the micro:bit
  13. Plug the connection to the rest of the light strip 20170709_203049.jpg


Setup some simple code to test the lights

  1. Add the package Neopixels (Advanced > Add Package > Neopixels)
  2. Create a Variable called np (Variables > Make a Variable)
  3. Under the “on start” block add the following code
  4. Get the Input “on button A pressed” and add the following code


Download the code to your computer then upload it to your micro:bit

Unplug the micro:bit from your computer before running the code – this will test the belt on battery power alone. Press A!

My goal is for people to send me colours and the belt will change to that colour. Watch this space for more code!


2 thoughts on “Make: micro:bit shiny belt

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s