Merge branch 'feature/menuInitBtn' into 'main'

add of setBtn function

See merge request SAE_203_2025/grA_21_Morpion_lumineaux/gra_21_morpion_lumineux_code!6
This commit is contained in:
T'JAMPENS QUENTIN p2406187 2025-06-17 08:30:12 +00:00
commit 2b01a1fbe5
2 changed files with 19 additions and 7 deletions

View File

@ -20,11 +20,19 @@ void setup() {
pinMode(A2, INPUT); pinMode(A2, INPUT);
<<<<<<< gra_21_morpion_lumineux_code.ino
=======
>>>>>>> gra_21_morpion_lumineux_code.ino
if (!cap.begin(0x5B)) { if (!cap.begin(0x5B)) {
Serial.println("MPR121 not found, check wiring?"); Serial.println("MPR121 not found, check wiring?");
while (1); while (1);
} }
Serial.println("MPR121 found!"); Serial.println("MPR121 found!");
<<<<<<< gra_21_morpion_lumineux_code.ino
=======
>>>>>>> gra_21_morpion_lumineux_code.ino
setupMenu(); setupMenu();
} }
@ -42,6 +50,9 @@ void loop() {
loopWeb(); loopWeb();
} }
} else { } else {
if(!isBtnSet){
setBtn(cap, lasttouched, currtouched);
} else{
if(solo) { if(solo) {
localModeSolo(cap, lasttouched, currtouched); localModeSolo(cap, lasttouched, currtouched);
} }

1
menu.h
View File

@ -20,6 +20,7 @@ extern bool isDifficulty;
extern bool isPlay; extern bool isPlay;
extern bool isWebSet; extern bool isWebSet;
#define BUTTON_A 15 #define BUTTON_A 15
#define BUTTON_B 32 #define BUTTON_B 32