Introduction: Micro:bit Night Lamp
So this is a rather simple project where we use the Micro:bit to both power and control a small night lamp. I made the project, so I could use the small LED strip from my Neopixel Introduction, but it was also importent for me to make the lamp so cheap and simple that it can eb made in most classrooms.
1 x Micro:bit
A strip of Neopixels (WS2812B).
3 mm MDF, you can also use plywood
3 x M3 bolts
9 x M3 nuts
A piece of acrylic
Some black or dark painters tape
Step 1: Download Files and Lasercut the Parts
Download the files and lasercut them. The acrylic part is just a boring square, so you might want to add your own design to it. In this project I have made it a bit round on the top and added a butterfly that my wife drew for me.
Step 2: Solder the LED Strip
Then we cut the neopixel strip so that we only have three neopixels. Neopixel strip can be cut betwen the pixels. If you look at the first picture, then the strip can be clip appart at the white stripe. Just use a wirecutter.
Then solder three wires to it. I have used a green wire on Din, black wire on gnd and red on 5 v.
Step 3: Add LEDs to Wood
Place the LED strip on to the small wood strip. Either use the tape on the strip or double sided tape.
Step 4: Add Screws and Bolts
Now take a wire and wrap it around one of the bolts, then use a nut to hold the wire in place.
Repeat that for all three wires.
Step 5: Add a Box Side to the Bolts
Then use 3 more nuts and fasten the bolts on the piece of woods with holes in it. It is rather importent that the wires is wired correctly. See the picture.
Step 6: Assemble the Box
Now just add glue to the wood and assemble the box.
Step 7: Add Micro:bit
Use 3 more nuts to screw the Micro:bit on to the box.
Step 8: Cover the LED
The Micro:bit have a LED that shows when it is powered up. We want to dime the light by putting a few layers of black painters tape on top of it.
Step 9: Add Your Design
Put the acrylic piece into the hole for it.
Step 10: Get the Extension
First you go to the Makecode editor and start a new project. You then go to "Advanced" and select "Extensions". Be aware that since I am danish, these buttons have slightly different names in the pictures. In extensions you search for "neopixel" and select the top left result.
Step 11: Program the Micro:bit
Here is a small test program that just changes the colour of the three LED's every fifth second, but you can make it much more interesting. You can make it turn on when it gets dark. Change colour when you shake the lamp or make it bluetooth controlled. You can do a lot with programming.
I have made a guide to programming Neopixels here.
You can find the code here.
Step 12: Test It
When you have finished programming the Micro:bit, then you can try out your new lamp.
There is a lot of ways you can change this project. Different acryllic designs. Different programming, but you can also try to make the box taller, so that it covers the LED on the Micro:bit or maybe broader so you can have 4 LED's instead of only 3.