Skip to content

Robote7701/SoundBox_MK1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎛️ SoundBox MK1

Boîte à sons murale DIY — Raspberry Pi Zero 2W, 30 boutons arcade WS2812B RGB, interface web Flask, mise à jour OTA via GitHub.

Version Python Flask License


📸 Présentation

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.

Fonctionnalités

  • 🎵 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)

🛠️ Hardware (~104€)

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

🚀 Installation rapide

Simulateur local (sans matériel)

git clone https://github.com/TON-PSEUDO/soundbox-mk1.git
cd soundbox-mk1
pip install flask pygame
python run.py
# → http://localhost:5000

Sur Raspberry Pi

git clone https://github.com/TON-PSEUDO/soundbox-mk1.git
cd soundbox-mk1
pip install flask pygame RPi.GPIO rpi-ws281x
sudo python run.py

Service systemd (démarrage auto au boot)

sudo cp deploy/soundbox.service /etc/systemd/system/
sudo systemctl enable soundbox
sudo systemctl start soundbox

📁 Structure

soundbox-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

🌐 API REST

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

🔄 Mise à jour OTA

  1. Pousse tes modifications sur la branche main
  2. Dans l'interface web → Config → Mises à jour
  3. Clique Vérifier puis Mettre à jour

Le Pi fait automatiquement git pull + systemctl restart soundbox.


🔌 Câblage GPIO

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

📄 Licence

MIT — libre d'utilisation, modification et distribution.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors