This program sets up an UDP server controlling a LED strip using the DNRGB protocol.
I use this program as part of my custom Ambilight system. It runs on a Raspberry Pi Zero W to control a WS2812B strip of 62 leds placed behind my screen, processing requests generated by psieg's Unofficial Prismatik Fork software.
It uses the rpi-ws281x-go library to control the Leds.
- A device with GPIO ports connected to an individually addressable LEDs strip (e.g. WS2812B), and capable of running executables (e.g. a Raspberry Pi)
- A development environment with go 1.13 (or ulterior) installed
My personnal configuration is currently hardcoded in the project for performance reasons. I recommend you to clone/fork this project in order to modify the constants and thus to adapt this project to your needs.
The main settings to tinker with are main.go's constants, namely port, ledCount and ledBrightness.
You may also want to modify the strip configuration options proposed by the rpi-ws281x-go library, located in strip.go.
- With Go installed, simply use the following command to generate a new executable:
go build
- Then execute the generated executable on your controller device
Note: According to your controller's operating system, you may have to execute this program with admin rights.
- Tutorial to set up a Raspberry Pi as LED strip controller: https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/
- Documentation on the DNRGB protocol: https://github.com/Aircoookie/WLED/wiki/UDP-Realtime-Control