No description
Find a file
Finn Christiansen 4758391b26
All checks were successful
Python formatting PEP8 / Pyhton-PEP8 (push) Successful in 15s
CSS Linter / CSS-Lint (push) Successful in 20s
Javascript Linter / Javascript-Lint (push) Successful in 11s
🔧 added apache sample config file
2023-06-11 15:25:04 +02:00
.gitea/workflows add javascript/eslint action 2023-06-01 21:21:06 +02:00
app 🐛 fix create_app factory 2023-06-09 20:06:31 +02:00
tests introduce blueprints and unit tests 2023-06-05 22:33:36 +02:00
.eslintrc.js add javascript/eslint action 2023-06-01 21:21:06 +02:00
.gitignore 🙈 ignore tags file 2023-05-31 20:18:29 +02:00
apache-rgb.conf 🔧 added apache sample config file 2023-06-11 15:25:04 +02:00
config.py introduce blueprints and unit tests 2023-06-05 22:33:36 +02:00
README.md 📝 update README 2023-05-31 20:25:15 +02:00
requirements.txt first prototype-like version 2023-05-28 12:38:23 +01:00
rgb.py fix "too many blank lines" make by purpose so workflow should get green again 2023-05-28 22:56:01 +01:00
rgb.service first prototype-like version 2023-05-28 12:38:23 +01:00
rgb.wsgi first prototype-like version 2023-05-28 12:38:23 +01:00

rpi-rgb

Very basic prototype of application for Raspberry Pi and Neopixel / ws281x LED strips. More to There's more to come.

Installation

Note: Please have in mind a lot of paths are hardcoded at the moment (webserver path for example).

Please have in mind that you need to connect an external power supply if you want to use a lot of LEDs. Each LED uses up to 60mA, my Pi Zero has a 2A power supply and everything works fine with 24 LEDs.

First, if possible, disable sound on your Pi to gain more performance:

echo "blacklist snd_bcm2835" > /etc/modprobe.d/snd-blacklist.conf
sed -i 's/dtparam=audio=on/#dtparam=audio=on/' config.txt
reboot

Clone this repository, install dependencies and set up environment:

git clone https://gitea.pimux.de/finn/rpi-rgb.git /var/www/vhosts/rgb.local
apt-get install apache2 libapache2-mod-wsgi-py3 python3-virtualenv python3-pip
cd /var/www/vhosts/rgb.local
virtualenv .
. bin/activate
pip install -r requirements.txt
cp apache-rgb.conf /etc/apache2/sites-available
a2ensite apache-rgb
systemctl reload apache2

Then connect your Neopixel LEDs to the Pi.

VCC -> Pin 2 5V
GND -> Ground (e.g. pin 6, 9, 14...)
DATA -> GPIO18 (pin 12)

Copy rgb.py to /usr/local/bin so the systemd service can use it. Then setup system file:

cp rgb.py /usr/local/bin
cp rgb.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable rgb
systemctl start rgb

Now put your Pi's IP address in any web browser and enjoy.