Boîte à sons murale DIY — Raspberry Pi Zero 2W, 30 boutons arcade WS2812B RGB, interface web Flask, mise à jour OTA via GitHub.
Un panneau mural arcade avec 30 boutons translucides rétroéclairés par des LEDs RGB individuelles. Chaque bouton joue un son configurable depuis une interface web accessible en WiFi.
- 🎵 30 boutons arcade avec son assignable par bouton
- 💡 30 LEDs WS2812B RGB — effets fixe / pulse / flash / arc-en-ciel
- 🔊 Volume physique (potentiomètre) + interface web
- 📂 Bibliothèque sonore avec upload drag & drop
- 🌐 Interface web responsive desktop + mobile
- 🔄 Mise à jour OTA en un clic depuis l'interface
- 💻 Simulateur Python local (sans matériel requis)
| Composant | Rôle |
|---|---|
| Raspberry Pi Zero 2W | Cerveau — WiFi intégré |
| Boutons arcade 30mm translucides × 30 | Interface physique |
| LEDs WS2812B 8mm × 30 | Rétroéclairage RGB derrière chaque bouton |
| DAC I2S PCM5102A + Ampli PAM8403 | Audio haute qualité |
| MCP3008 ADC + Potentiomètre 10kΩ | Contrôle volume physique |
| Panneau MDF 700×500mm | Support mural |
git clone https://github.com/TON-PSEUDO/soundbox-mk1.git
cd soundbox-mk1
pip install flask pygame
python run.py
# → http://localhost:5000git clone https://github.com/TON-PSEUDO/soundbox-mk1.git
cd soundbox-mk1
pip install flask pygame RPi.GPIO rpi-ws281x
sudo python run.pysudo cp deploy/soundbox.service /etc/systemd/system/
sudo systemctl enable soundbox
sudo systemctl start soundboxsoundbox-mk1/
├── run.py ← Point d'entrée
├── app.py ← Serveur Flask (API REST + SSE)
├── hal.py ← Couche abstraction hardware
├── requirements.txt
├── config.json.example
├── sounds/ ← Tes fichiers WAV/MP3 (ignorés par git)
├── static/
│ └── index.html ← Panneau simulateur visuel
├── simulator/ ← Mocks GPIO / WS2812B / ADC / Audio
└── deploy/
└── soundbox.service ← Service systemd
| Méthode | Endpoint | Description |
|---|---|---|
| GET | /api/buttons |
Tous les boutons |
| PUT | /api/buttons/{idx} |
Modifier un bouton |
| POST | /api/buttons/{idx}/play |
Jouer le son depuis l'interface |
| GET/POST | /api/volume |
Lire/modifier le volume |
| GET | /api/leds |
État des LEDs |
| PUT | /api/leds/{idx} |
{"hex": "#ff4400"} |
| GET | /api/sounds |
Liste des sons |
| POST | /api/sounds/upload |
Uploader un son |
| GET | /api/events |
SSE temps réel |
| GET | /api/sim/state |
État complet simulateur |
- Pousse tes modifications sur la branche
main - Dans l'interface web → Config → Mises à jour
- Clique Vérifier puis Mettre à jour
Le Pi fait automatiquement git pull + systemctl restart soundbox.
| Signal | GPIO | Notes |
|---|---|---|
| ROW0–4 | 4 / 17 / 27 / 22 / 10 | Matrice boutons |
| COL0–5 | 16 / 20 / 21 / 12 / 7 / 8 | Colonnes |
| WS2812B DIN | GPIO18 | Résistance 470Ω en série |
| PCM5102A (I2S) | GPIO18 / 19 / 21 | BCK / LRCK / DIN |
| MCP3008 (SPI1) | GPIO20 / 19 / 21 / 25 | MOSI / MISO / CLK / CS |
MIT — libre d'utilisation, modification et distribution.