Add tic tac toe function

This commit is contained in:
Pyramond
2025-06-16 16:03:31 +02:00
parent 0339690891
commit 2a2da7c90a
2 changed files with 157 additions and 3 deletions
+18 -3
View File
@@ -2,14 +2,28 @@
#include "logo.h"
#include "menu.h"
#include "web.h"
#include "localMode.h"
#include <SPI.h>
#include <Wire.h>
#include "Adafruit_MPR121.h"
#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);
if (!cap.begin(0x5B)) {
Serial.println("MPR121 not found, check wiring?");
while (1);
}
Serial.println("MPR121 found!");
setupMenu();
}
@@ -26,7 +40,8 @@ void loop() {
loopWeb();
}
} else {
// Mode local
// Passe cap, lasttouched, currtouched par référence !
localMode(cap, lasttouched, currtouched);
}
}
}
}