1.3 KiB
1.3 KiB
pi-test-cam — Contexte projet
Matériel
- Raspberry Pi Zero 2W (pi-wireclaw, 192.168.1.132)
- Caméra OV5647 connectée sur port CSI
- OS : Raspberry Pi OS Bookworm Lite (SSH uniquement)
Rôle
Serveur de test caméra pour le projet WireClaw (drone d'inspection industrielle). En prod, le Pi Zero rejoindra le hotspot WireClaw (10.42.0.0/24) créé par le Jetson.
Stack
- Python 3, Flask, OpenCV
- Packages système apt (pas de virtualenv)
- Fichiers dans ~/pi-test-cam/
Endpoints Flask (port 5000)
- GET /stream → flux MJPEG
- GET /snapshot → photo JPEG
- GET /settings → lire les réglages
- POST /settings → modifier brightness, contrast, saturation
Réseau WireClaw complet
- Jetson : 192.168.1.84 / 10.42.0.1 (FastAPI :8765, hotspot)
- ESP32 : 192.168.1.122 / 10.42.0.77 (MAVLink relais)
- Pi Zero : 192.168.1.132 / 10.42.0.XX (caméra)
Repo
git.syoul.fr/nicoboy/pi-test-cam
Workflow de déploiement
Après chaque modification de code, toujours :
- Committer et pusher sur Gitea :
git add . && git commit -m "..." && git push origin master - Déployer sur le Pi Zero :
ssh pi@192.168.1.132 "cd pi-test-cam && git pull && pkill -f camera_server; python3 camera_server.py &" - Vérifier le flux : http://192.168.1.132:5000/stream