Control your raspberry pi ws281x
leds from your network, using a local api / web application.
Backend: python
/ fast-api
| Frontend: vuejs
/ vuetify
On the pi run the following pip commands (as root cause the service will need priviledges to access PWM channels).
sudo pip3 install rpi_ws281x_hub
Once installed make sure that the config.json
file match your hardware setup, important part being num
(number of pixels), pin
(hardware pin used to control the led) and finally channel
(depending on the pin).
Know working pin|channel
pairs are: 12|0
, 18|0
or 13|1
see rpi_ws281x for more information.
Finally fire the thing with:
sudo rpi-ws281x-hub
And open http://<your-pi-ip>:8000
in a web browser.
Clone this repository:
git clone https://github.com/vrince/rpi-ws281x-hub.git
cd rpi-ws281x-hub
Install dependencies and install package in dev mode:
sudo python3 setup.py develop
Run locally:
# using script
sudo rpi-ws281x-hub
# or directly using the api.py main
sudo python3 rpi_ws281x_hub/api.py --port 8000
Web application can be reach at http://<your-pi-ip>:8000/app
https://github.com/jgarff/rpi_ws281x
All images used are from flaticon.com
make sure to visite their site :
https://www.flaticon.com/search?author_id=1&style_id=15&type=standard&word=color