pull down to refresh

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!

43 sats \ 1 reply \ @mkmloom 17 Oct

Wowwww....very Nice....thanks for sharing for the comunity

reply

Thank you šŸ’“šŸ˜Œ

reply
180 sats \ 1 reply \ @jasonb 16 Oct

Very cool! Where are you going to put them?

reply

Thank you ā¤ļø probably in our bedroom but I’m still not sure.

reply

Sooooo cool you're inspiring me!

reply

Oh, that’s so sweet, thank you 🩷

reply