No description
  • Python 72.7%
  • Go 27.3%
Find a file
2026-02-25 22:59:39 +01:00
systemd change to post and add documentation 2025-12-07 17:06:59 +01:00
ui feat: add examples and readme 2026-02-25 22:59:39 +01:00
.gitignore feat: add go ui 2026-02-25 22:45:06 +01:00
buttons.py logging 2026-02-25 22:55:17 +01:00
config.py logging 2026-02-25 22:55:17 +01:00
leds.py logging 2026-02-25 22:53:04 +01:00
LICENSE Initial commit 2025-11-19 22:05:53 +01:00
main.py change port to 10 2026-02-25 19:11:05 +01:00
mock_neopixel.py change to post and add documentation 2025-12-07 17:06:59 +01:00
neopixel_rpi_simpletest.py test rpi 2026-02-25 22:15:36 +01:00
README.md feat: add go ui 2026-02-25 22:45:06 +01:00
requirements.txt test rpi 2026-02-25 22:15:36 +01:00
test_neopixel.py change pin to 10 2026-02-25 21:24:31 +01:00
test_neopixel2.py second test 2026-02-25 21:53:26 +01:00

lightpickrally

Lib: https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel

python einrichten

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

pip install -r requirements.txt

Pins

LED-Pin: 10

config.py: Pins für die Spieler definieren

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

# → Interfacing Options → SPI/I2C/GPIO aktivieren falls nötig
sudo raspi-config
Gehe zu Interfacing Options und dann zu SPI.
Wähle Yes, um SPI zu aktivieren.
Starte den Raspberry Pi neu.
sudo reboot

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