Hello frens!
How have you been? I hope you're doing good and are healthy wherever you might be.
They say idle hands are the devilās playground, and I have so many projects waiting for me but, like most people, not nearly enough time. But thatās another conversation.
Anyway, I kept myself busy last week and this week too with a project Iāve been coming back to for quite a while. Iām so happy I finally made the time to make it real!
When I stumbled upon this project, I was very excited about it, Using NeoPixels with the Raspberry Pi. I thought, āMaybe instead I could make a sunrise lamp.ā
And boy, was it a journey.
Even before I started researching, I thought the best Raspberry Pi for such a simple project would be a Raspberry Pi Zero 2 W. Unfortunately, I couldnāt find one, so I decided to go with the next best option especially since I was already brainstorming what else I could do with it besides the sunrise lamp. So I got a Raspberry Pi 3 B+.
Let me walk you through it.
First, it was a bit of a nightmare to install the OS. I donāt know why I struggle with that part and with passwords. I type passwords the way R. L. Stine writes his stories: with just one finger. Either way, I finally managed to install everything and connect to the Wi-Fi.
I knew I would eventually need an electrolytic capacitor and one of those logic level shifters, but for the first trialsājust trying to get the Pi and the LEDs workingāI left those for later.
I also need a proper power supply for the LEDs themselves. Iām still not entirely sure, since itās only 32 LEDs, but weāll see. The preventive side of me will probably end up getting one anyway.
I had to test the first LED strip, but first I had to connect everything to the right GPIO pins and solder the wires. Usually my husband helps me with this part, but he only helped me with the first strip. After that, I was all on my own.
I didnāt know soldering would be as challenging as stripping the wires, but once I got the hang of it, things went much more smoothly.
I did a lot of the research and troubleshooting myself, and for the scripts I also tried a bit of vibe coding. But hey, I was still the one soldering, wiring everything up, testing it, and figuring out what was going wrong. Then I ran the test and⦠it worked!
But then, of course, came the real challenge... soldering everything together! All the wires and the LED strips.
I had to use the headlamp I use when walking my doggie, and next time Iāll definitely need a magnifying glass. I had to squint from time to time just to make sure I was soldering in the right place.
I managed to do the devilās work, I mean, my project, and then I used another script. But before that, I had to install Python in a virtual environment, because otherwise it wouldnāt let me install rpi_ws281x.
It seems this way is easier to update and keep contained, and it doesnāt affect the rest of the Pi. Also, this time I did everything directly in the terminal. I didnāt use Thonny this time!
So many firsts with this project.
Anyway, in the end, my soldering and the script worked together beautifully!
A sunset right there just for me!
Throughout all this testing, I kept sniffing the Pi and the GPIO area from time to time, just in case I had connected something wrong. After all, powering the LEDs directly from the Pi could be too much for it.
Slowly but surely, I was able to turn the LEDs on and off first. Then I added the sunrise and sunset scripts.
After that, I moved on to the web server. Since I had already dipped my toes into this with my Raspberrarium, I decided this time it wouldnāt just show me information, it would also have buttons to control the LEDs.
Then I added a āreading mode,ā a āfun mode,ā and a ārelax mode.ā
Reading mode
I got super excited watching the first sunset that day. Every five minutes, I would just look at the LEDs slowly dimming.
This week, I added a few more buttons to the web server: some colors, dimming controls, and ādemosā of the sunrise and sunset scripts.
Sunset and Sunrise have buttons though they are running automatically in the background. I still kept them because it reminds me of how this project started.
What a ride it was!
Rainbow mode
And Iām not finished yet. This is still a work in progress, and Iāll add a few more things. Iām so happy with it.
I feel like a wizard.
So, see you later, alligator!
Wowwww....very Nice....thanks for sharing for the comunity
Thank you šš
Very cool! Where are you going to put them?
Thank you ā¤ļø probably in our bedroom but Iām still not sure.
Sooooo cool you're inspiring me!
Oh, thatās so sweet, thank you š©·