No description
Find a file
fz 999ad0578a update requirements
turn of leds after timeout
2025-12-07 18:19:20 +01:00
systemd change to post and add documentation 2025-12-07 17:06:59 +01:00
.gitignore change to post and add documentation 2025-12-07 17:06:59 +01:00
buttons.py implement basic led race 2025-12-07 17:58:16 +01:00
config.py implement basic led race 2025-12-07 17:58:16 +01:00
leds.py update requirements 2025-12-07 18:19:20 +01:00
LICENSE Initial commit 2025-11-19 22:05:53 +01:00
main.py implement basic led race 2025-12-07 17:58:16 +01:00
mock_neopixel.py change to post and add documentation 2025-12-07 17:06:59 +01:00
README.md change to post and add documentation 2025-12-07 17:06:59 +01:00
requirements.txt update requirements 2025-12-07 18:19:20 +01:00

lightpickrally

python einrichten

python3 -m venv .venv source .venv/bin/activate

pip install -r requirements.txt

test unter linux

mit flash webserver

MOCK_LED=1 .venv/bin/python main.py

mit produktivem gunicorn webserver

MOCK_LED=1 gunicorn -b 0.0.0.0:5000 main:app

ein Segment

curl -X POST http://localhost:5000/led
-H "Content-Type: application/json"
-d '{ "segments": [ { "index": 0, "count": 5, "rgb": "FF0000" } ] }'

mehrere Segmente

curl -X POST http://localhost:5000/led
-H "Content-Type: application/json"
-d '{ "segments": [ { "index": 0, "count": 5, "rgb": "FF0000" }, { "index": 10, "count": 10, "rgb": "00FF00" }, { "index": 30, "count": 3, "rgb": "0000FF" } ] }'

Installation auf dem pi

sudo apt install python3-venv python3-pip git -y

sudo raspi-config

→ Interfacing Options → SPI/I2C/GPIO aktivieren falls nötig

cd /home/pi git clone https://git.swablab.de/projects/lightpickrally.git cd lightpickrally

python3 -m venv .venv source .venv/bin/activate

pip install --upgrade pip pip install -r requirements.txt

systemd/lightserver.service nach /etc/systemd/system/lightserver.service kopieren

sudo systemctl daemon-reload sudo systemctl enable lightserver sudo systemctl start lightserver sudo systemctl status lightserver

Logs prüfen

journalctl -u lightserver -f