WS2801 project, creating a mountable, interactive, LED... thinger
There are plenty of ways to build something like this. I used a RaspberryPi 3B+ on Raspbian Buster. Python 3.7+ is a requirement because of the quart
import. Other webservers will work fine, but I chose quart because of how simply it allows websockets. There are no .js includes on the HTML side, so that piece of the communications is easy to parse by a human. Learning more about websockets was a side goal for this project.
- test.py: Runs WS2801 grid demo
- websocket-quart.py: HTTP-based control for grid
- templates/index.html: Base HTML doc for quart to render and send to client browsers
- ws2801_funcs.py: Carries some of the WS2801 functions
- Dockerfile: Attempt to make this Docker-able. WIP. GPIO is hard. (-:
- RaspberryPi with breadboard, power supply, MicroSD card, etc; demo build is a 3B+
- WS2801 LED strings; demo build has 4 strings, 200 lights total
- 3 to 5V logic stepper; strictly speaking, this isn't required, but you may less flicker with this included
- Wires that plug into breadboards easily
- T-connectors; they make powering the strings in parallel much easier
- Lexan or Plexi or cardboard or whatever you'd like to mount on!
There are wiring coloring assumptions that may not hold true! Please check specs of your materials before going ahead.
Central to all of this are 5V+ and GND, of course. With a breadboard adapter connecting the Pi, I used the 5V+/- rails on the edge for all power and ground. I tried adding an external 5V power source to these rails and removed the MicroUSB power, but the Pi wouldn't power up consistently. NB: while power can be transmitted all the way down the chain, there will be noticeable dimming. The T-connectors make parallel power pretty easy.
For signal, the WS2801 string needs CO connected to SCLCK on the Pi, and DO connected to MOSI. They can be connected directly with some success, but the stepper has improved results for me.
- Multimeter to check connections and voltage
- 6mm drill bit for through-mounting LEDs
- Knife for cutting Lexan/Plexi/etc