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);
<<<<<<< gra_21_morpion_lumineux_code.ino
=======
>>>>>>> gra_21_morpion_lumineux_code.ino
if (!cap.begin(0x5B)) {
Serial.println("MPR121 not found, check wiring?");
while (1);
}
Serial.println("MPR121 found!");
<<<<<<< gra_21_morpion_lumineux_code.ino
=======
>>>>>>> gra_21_morpion_lumineux_code.ino
setupMenu();
}
@ -42,12 +50,15 @@ void loop() {
loopWeb();
}
} else {
if(solo) {
localModeSolo(cap, lasttouched, currtouched);
if(!isBtnSet){
setBtn(cap, lasttouched, currtouched);
} else{
if(solo) {
localModeSolo(cap, lasttouched, currtouched);
}
else {
localModeDuo(cap, lasttouched, currtouched);
}
}
}
else {
localModeDuo(cap, lasttouched, currtouched);
}
}
}
}

1
menu.h
View File

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