Lighting up two groups of LEDs with two buttons. They are bright! (Images & video: Me)
I learned quite a bit in the last 10-LED PWM controller project. I learned that I maxed out what I could do with the Micro:bit as far as traditional LED controlling was concerned. The problems being I could only control so many, couldn’t record a sequence, and was limited in the output power for each LED.
The logical next step was rip everything out and go with addressable LEDs. In this project, I do just that. Plus I almost double the number of buttons controlling LEDs, 6x the number of LEDs lit up, increase the lumen output, and I am able to record and replay a sequence!
This project is a monumental step up in how the LEDs look. Instead of the traditional 5mm dome LEDs, I moved to addressable LEDs. In particular, I went with an 8x8 LED grid configuration. It’s like a mini-screen.
The software works as follows:
- Power it up.
- Immediately press buttons to light up any LED according to buttons pressed.
- Press the “A” button and start a recording sequence.
- Press your combination.
- Press “A” again to end the sequence.
- Press “B” to play back your light show.
First, let’s gather all the necessary components you’ll need to build this project.
Video demonstration of the project:
STEP 1
Load the code onto the Micro:bit.
I am providing the hex file you need to drag and drop onto the Micro:bit, and the python code as two separate files. For the below process, just use the hex file.
Plug the MicroUSB cable into the Micro:bit, and plug the other end of the cable to a PC or MAC.
At this point, you are going to copy over the code to the Micro:bit. I am providing the program (code) in this post that needs to be copied over. When the Micro:bit plugs into a computer, it shows up as a USB flash drive. All you have to do is copy the file over to the Micro:bit, like it’s a USB Flash Drive, and the Micro:bit will reset, and the program is active.
You can remove the Micro:bit from the computer at this point. The program will start running, and without the rest of the circuit, it will not function.
●
A little bit about the code:
The code is completely commented by section. So, please take a read!
STEP 2
The schematic is fairly straight forward. Wire it up like the drawing.
STEP 3
Setup
The software works as follows:
The software works as follows:
- Power it up.
- Immediately press buttons to light up any LED according to buttons pressed.
- Press the “A” button and start a recording sequence.
- Press your combination.
- Press “A” again to end the sequence.
- Press “B” to play back your light show.
Conclusion:
Addressable LEDs are the way to go for a light show controller, for sure. Brightness and control are superb.
The only issue I has was with the on-board memory of the Micro:bit. I could only record about 20 seconds of sequence time. So, is there a way around this? Can I expand the memory? Just wait and see on the next project!