Cut a red, black, and white wire to about 3-4 inches, or longer depending on your build base. Solder the red wire to VBUS, the black to G, and the white to GP0.
Solder NeoPixels
Since this project may get dripped on, it's best to seal both ends of our pixel strip so no stray splashes can get inside. Start by cutting a couple pieces of your clear heat shrink tubing and slipping them onto your pixel strand. We'll solder up our strip, test, then seal it up once we know it's working.
Cut your pixel strip to length through the middle of the copper pads. My strip has 30 pixels. Be sure to count twice before you cut.
Trim and tin the wires coming from the Pi, and tin the pads on the NeoPixel strip. Make sure you're soldering to the IN end - these strips are directional and won't work if you connect the wrong end.
If you're new to soldering pixel strips, check out this guide on How to Solder NeoPixels.
Plug your Pico W in via the USB port. Wait a few seconds for the WiFi to connect. If it's going to rain in your area, the lights will come on.
This project can be a little tricky to test. If it's not about to rain where you are, the pixels won't turn on, which means they're working correctly. But that doesn't help when you're testing solder joints. What to do?
In order to test, we need to find a place where it's currently raining and temporarily change our latitude and longitude in our code.py file. Here's a nifty tool: the World Weather Map shows weather patterns across the whole world. It's often raining in New Orleans in the spring, and the South American rain forests are full of rainy areas. Pick your favorite, click on it, and copy the latitude and longitude from the URL.
Then open up code.py and edit these lines to reflect the rainiest spot you can find:
# latitude
lat = 29.04
# longitude
long = -90.36
If you've got everything wired up and installed correctly, your lights will turn on. Success! Time to seal up the strips and install your lights.
Troubleshooting
If your lights don't come on, here are a few things to try:
- Try a different latitude and longitude, just in case you missed a rainstorm by a few ticks.
- Check to be sure you soldered to the IN end of the pixel strand and not the OUT end. It won't work if you solder to the wrong end.
- If your lights come partially on, or come on in wonky colors, check your power supply. If you're plugging into a surge protector, try plugging directly into the wall or into your computer and see if that fixes things. This board seems to need a full 5v to get the pixels working right, so a cheap power supply may cause problems.
- Double check your code and your settings.toml file. Be sure you've entered both your WiFi credentials and your Adafruit IO key in settings.toml, and be sure they're correct. The code will reset the board if it's missing any data, so if your board is resetting again and again this is likely your problem.
- Be sure you wired to GP0 on the Pi. If you wired to a different pin, you can change it in code.py.
Seal the Strip
Once you're sure it's working correctly, seal up both ends of your NeoPixel strip by sliding the heat shrink over the solder joints then filling the heat shrink with some hot glue. While the glue is still wet, use a heat gun to shrink the heat shrink. This will form a waterproof seal on your pixels that will keep any rain splashes out.
TIP: do not use silicone glue for this step, as some varieties will corrode electronics.
Text editor powered by tinymce.