Add local solo mode

This commit is contained in:
Pyramond
2025-06-16 17:01:54 +02:00
parent 15f5d46b55
commit 08de0a245c
2 changed files with 62 additions and 9 deletions
+7 -3
View File
@@ -10,13 +10,13 @@
#include <Adafruit_NeoPixel.h>
// --- Capteur capacitif ---
// Attention : Une SEULE instance globale !
Adafruit_MPR121 cap = Adafruit_MPR121();
uint16_t lasttouched = 0;
uint16_t currtouched = 0;
void setup() {
Serial.begin(115200);
randomSeed(analogRead(0));
if (!cap.begin(0x5B)) {
Serial.println("MPR121 not found, check wiring?");
@@ -40,8 +40,12 @@ void loop() {
loopWeb();
}
} else {
// Passe cap, lasttouched, currtouched par référence !
localMode(cap, lasttouched, currtouched);
if(solo) {
localModeSolo(cap, lasttouched, currtouched);
}
else {
localModeDuo(cap, lasttouched, currtouched);
}
}
}
}