#include <Keypad.h>
#include <LiquidCrystal.h>
#include "Servo.h"
/*
Pin 8 Buzzer
Pin 30 LED blanche
Pin 32 LED verte
Pin 31 LED rouge
Pin 33 Interrupteur
Pin 34 Trigger capteur ultrasonique
Pin 35 Echo capteur ultrasonique
Pin 2 Ecran LCD - D4
Pin 3 Ecran LCD - D5
Pin 4 Ecran LCD - D6
Pin 5 Ecran LCD - D7
Pin 6 Ecran LCD - E
Pin 7 Ecran LCD - RS
Pin 12 Servo-moteur (Porte 1)
Pin 13 Servo-moteur (Porte 2)
Pin 22-29 Clavier matriciel
*/
int ultrasons_distance_with_door = 30;
bool affichage_mdp_letter = true;
bool state_door = false; //false = fermer , true ouverte
Servo servo_porte_1; // création de l'objet "servo"
Servo servo_porte_2; // création de l'objet "servo"
#define trigPin 10
#define echoPin 11
long duree; // durée de l'echo
int distance; // distance
// Définition du clavier
const byte ROWS = 4;
const byte COLS = 4;
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {28, 26, 24, 22};
byte colPins[COLS] = {29, 27, 25, 23};
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
// Définition de l'écran LCD
LiquidCrystal LCD(7, 6, 5, 4, 3, 2);
// Broche
const int buzzerPin = 9;
const int led_white_pin = 30;
const int led_green_pin = 32;
const int led_red_pin = 31;
const int switch_pin = 33;
// Code à entrer
char password[] = "AB37";
char enteredPassword[5]; // Variable pour stocker le mot de passe entré
byte passwordIndex = 0;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
servo_porte_1.attach(12); // attache le servo au pin spécifié
servo_porte_2.attach(13); // attache le servo au pin spécifié
randomSeed(analogRead(0));
CloseDoor();
LCD.begin(20, 4);
pinMode(buzzerPin, OUTPUT);
pinMode(led_white_pin, OUTPUT);
pinMode(led_green_pin, OUTPUT);
pinMode(led_red_pin, OUTPUT);
pinMode(switch_pin, INPUT);
start();
}
void loop() {
char key = keypad.getKey();
}
void start() {
CloseDoor();
LCD.clear();
LCD.setCursor(3, 0);
LCD.print("--ShieldDesk--");
LCD.setCursor(5, 2);
LCD.print("Loading...");
LCD.print("");
delay(1800);
LCD.clear();
LCD.setCursor(0, 0);
bool no_cliqued_1or2 = true;
bool choice_rfid = false;
LCD.setCursor(0,0);
LCD.print("1-Mot de passe");
LCD.setCursor(0, 1);
LCD.print("2-Carte d'acces");
char key = keypad.getKey();
while (no_cliqued_1or2){
char key = keypad.getKey();
if (key == '1') {
choice_rfid = false;
break;
}
if (key == '2') {
choice_rfid = true;
break;
}
}
LCD.clear();
if (choice_rfid) {
LCD.setCursor(0, 0);
LCD.print("Scanner votre");
LCD.setCursor(0, 1);
LCD.print("carte d'acces...");
delay(5000);
}
else {
bool no_validate_psw = true;
LCD.setCursor(0, 0);
LCD.print("Entrer le mot de");
LCD.setCursor(0, 1);
LCD.print("passe :");
LCD.setCursor(0, 2);
while (no_validate_psw) {
char key = keypad.getKey();
if (key) {
if (key == '#') {
enteredPassword[passwordIndex] = '\0'; // Terminer le mot de passe
if (strcmp(enteredPassword, password) == 0) {
LCD.clear();
LCD.print("Code bon");
LCD.clear();
acces_checked();
LCD.print("Ouverture en cours..");
delay(1500);
LCD.setCursor(0, 0);
LCD.clear();
LCD.setCursor(0, 0);
OpenEnvironmentShieldDesk();
no_validate_psw = false;
break;
passwordIndex = 0;
} else {
LCD.clear();
digitalWrite(led_red_pin, HIGH);
LCD.print("Mot de passe");
LCD.setCursor(0, 1);
LCD.print("incorrect !");
LCD.setCursor(0, 2);
LCD.print("veuillez reessayer");
tone(buzzerPin, 400, 250);
delay(500);
noTone(9); // désactiver le buzzer actif arduino
delay(500);
digitalWrite(led_red_pin, LOW);
LCD.clear();
LCD.print("Entrez le mot de");
LCD.setCursor(0, 1);
LCD.print("passe :");
passwordIndex = 0;
}
memset(enteredPassword, 0, sizeof(enteredPassword)); // Réinitialiser le mot de passe entré
} else {
enteredPassword[passwordIndex] = key;
if (affichage_mdp_letter) {
LCD.print(key);
}
else {
LCD.print("*");
}
passwordIndex++;
}
}
}
}
}
void reset() {
start();
}
void acces_checked(){
digitalWrite(led_green_pin, HIGH);
LCD.clear();
LCD.setCursor(0, 0);
OpenDoor();
}
void OpenEnvironmentShieldDesk() {
LCD.clear();
LCD.setCursor(3,0);
LCD.print("Bienvenue dans ");
LCD.setCursor(2,1);
LCD.print("L'environnement");
LCD.setCursor(5,2);
LCD.print("ShieldDesk.");
LCD.setCursor(5,3);
LCD.print("Loading.");
LCD.setCursor(5,3);
delay(230);
LCD.print(" ");
LCD.setCursor(5,3);
LCD.print("Loading..");
LCD.setCursor(5,3);
delay(230);
LCD.print(" ");
LCD.setCursor(5,3);
LCD.print("Loading...");
LCD.setCursor(5,3);
delay(230);
LCD.print(" ");
LCD.setCursor(5,3);
LCD.print("Loading.");
LCD.setCursor(5,3);
delay(230);
LCD.clear();
LCD.setCursor(0,0);
LCD.print("1-Fermer la porte");
LCD.setCursor(0,1);
LCD.print("2-Entretien / Usure");
LCD.setCursor(0,2);
LCD.print("3-Parametre");
LCD.setCursor(0,3);
LCD.print("4-Je m'ennuie");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1') {
LCD.clear();
LCD.print("Appuyer sur 'A'");
LCD.setCursor(0, 1);
LCD.print("pour fermer la");
LCD.setCursor(0, 2);
LCD.print("porte");
while (1 == 1){
char key = keypad.getKey();
if (key) {
if (key == 'A'){
CloseDoor();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("Fermeture de");
LCD.setCursor(0,1);
LCD.print("L'armoire");
digitalWrite(led_green_pin, LOW);
delay(2000);
reset();
break;
}
}
} } else if (key == '2') {
Serial.println("Entretien");
CleanLCD();
LCD.setCursor(0,0);
LCD.print("1-Test led");
LCD.setCursor(0,1);
LCD.print("2-Temperature");
LCD.setCursor(0,2);
LCD.print("3-Test ecran");
LCD.setCursor(0,3);
LCD.print("4-Test membrane");
while ( 1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1') {
CleanLCD();
LCD.print("1-Led verte");
LCD.setCursor(0,1);
LCD.print("2-Led rouge");
while(1 == 1) {
if (key) {
if (key == '1'){
CleanLCD();
LCD.print("Led : on");
digitalWrite(led_green_pin, HIGH);
delay(400);
CleanLCD();
LCD.print("Led : off");
digitalWrite(led_green_pin, LOW);
delay(400);
CleanLCD();
LCD.print("Led : on");
digitalWrite(led_green_pin, HIGH);
delay(400);
CleanLCD();
LCD.print("Si la led ne s'est");
LCD.setCursor(0,1);
LCD.print("allumee au bon");
LCD.setCursor(0,2);
LCD.print("moment, la led est");
LCD.setCursor(0,3);
LCD.print("endomagee.");
delay(1400);
CleanLCD();
OpenEnvironmentShieldDesk();
}
if (key == '2') {
CleanLCD();
LCD.print("Led : on");
digitalWrite(led_red_pin, HIGH);
delay(400);
CleanLCD();
LCD.print("Led : off");
digitalWrite(led_red_pin, LOW);
delay(400);
CleanLCD();
LCD.print("Led : on");
digitalWrite(led_red_pin, HIGH);
delay(400);
CleanLCD();
LCD.print("Si la led ne s'est");
LCD.setCursor(0,1);
LCD.print("allumee au bon");
LCD.setCursor(0,2);
LCD.print("moment, la led est");
LCD.setCursor(0,3);
LCD.print("endomagee.");
delay(1400);
CleanLCD();
OpenEnvironmentShieldDesk();
}
}
}
}
if (key == '2') {
CleanLCD();
LCD.print("Test capteur");
LCD.setCursor(0,1);
LCD.print("de temperature");
LCD.setCursor(0,2);
}
if (key == '3') {
}
if (key == '4') {
}
}
}
} else if (key == '3') {
OpenSettings();
} else if (key == '4') {
LCD.clear();
LCD.setCursor(0, 0);
LCD.print("Que veut tu faire ?");
LCD.setCursor(0, 1);
LCD.print("1-Sport");
LCD.setCursor(0, 2);
LCD.print("2-Loisirs");
while ( 1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1'){
LCD.clear();
LCD.setCursor(0, 0);
LCD.print("Quel type de sport");
LCD.setCursor(0, 1);
LCD.print("veux-tu pratiquer ?");
LCD.setCursor(0,2);
LCD.print("1-Footing");
LCD.setCursor(0,3);
LCD.print("2-Musculation");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1') {
LCD.clear();
LCD.setCursor(0,0);
LCD.print("Footing");
}
if (key == '2') {
LCD.clear();
LCD.setCursor(0,0);
LCD.print("Intensite : ");
LCD.setCursor(0,1);
LCD.print("1-Novice");
LCD.setCursor(0,2);
LCD.print("2-Intermediaire");
LCD.setCursor(0,3);
LCD.print("3-Avance");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1') {
EntrainementNoviceMusculation();
}
if (key == '2') {
EntrainementIntermediaireMusculation();
}
if (key == '3') {
EntrainementAvanceMusculation();
}
}
}
}
}
}
}
else if (key == '2'){
LCD.clear();
LCD.setCursor(0, 0);
LCD.print("Ou ?");
LCD.setCursor(0, 1);
LCD.print("1-en plein air");
LCD.setCursor(0, 2);
LCD.print("2-en interieur");
int randomNumber = random(0, 8); // Générer un nombre aléatoire entre 1 et 7
Serial.println(randomNumber);
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1') {
LCD.clear();
LCD.setCursor(0,0);
LCD.print("Voici une activite");
LCD.setCursor(0,1);
LCD.print("en plein air");
if (randomNumber == 1) {
LCD.setCursor(0,2);
LCD.print("Randonnee");
}
if (randomNumber == 2) {
LCD.setCursor(0,2);
LCD.print("Ecoute de la musique");
}
if (randomNumber == 3) {
LCD.setCursor(0,2);
LCD.print("Photographie");
}
if (randomNumber == 4) {
LCD.setCursor(0,2);
LCD.print("Lecture");
}
if (randomNumber == 5) {
LCD.setCursor(0,2);
LCD.print("Dessin");
}
if (randomNumber == 6) {
LCD.setCursor(0,2);
LCD.print("Yoga");
}
if (randomNumber == 7) {
LCD.setCursor(0,2);
LCD.print("Jardinage");
}
LCD.setCursor(0, 3);
LCD.print("A-Sortir");
wait_press_A();
OpenEnvironmentShieldDesk();
}
}
if (key == '2') {
LCD.clear();
LCD.setCursor(0,1);
LCD.print("Voici une activité");
LCD.setCursor(0,2);
LCD.print("intérieur");
if (randomNumber == 1) {
LCD.setCursor(0,3);
LCD.print("Jeux vidéo");
}
if (randomNumber == 2) {
LCD.setCursor(0,3);
LCD.print("Écoute de la musique");
}
if (randomNumber == 3) {
LCD.setCursor(0,3);
LCD.print("Jeux de société");
}
if (randomNumber == 4) {
LCD.setCursor(0,3);
LCD.print("Yoga/méditation");
}
if (randomNumber == 5) {
LCD.setCursor(0,3);
LCD.print("Cuisine");
}
if (randomNumber == 6) {
LCD.setCursor(0,3);
LCD.print("Regarder des films");
}
if (randomNumber == 7) {
LCD.setCursor(0,3);
LCD.print("Appels tes proches");
}
LCD.setCursor(0, 3);
LCD.print("A-Sortir");
wait_press_A();
OpenEnvironmentShieldDesk();
}
}
}
}
}
}
}
}
}
void OpenDoor(){
servo_porte_1.write(100);
servo_porte_2.write(-100);
}
void CloseDoor(){
servo_porte_1.write(0);
servo_porte_2.write(180);
}
void OpenSettings() {
LCD.clear();
LCD.setCursor(0,0);
LCD.print("====================");
LCD.setCursor(0,2);
LCD.print("====================");
LCD.setCursor(0,3);
LCD.print("====================");
LCD.setCursor(3,1);
LCD.print("--Parametre--");
delay(1500);
LCD.clear();
LCD.setCursor(0,0);
LCD.print("1-Mot de Passe");
LCD.setCursor(0,1);
LCD.print("2-Ventilation");
LCD.setCursor(0,2);
LCD.print("3-Ouvrire le boitier");
LCD.setCursor(0,3);
LCD.print("4-Exit");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1') {
LCD.clear();
LCD.print("1-Changer le mdp");
LCD.setCursor(0, 1);
LCD.print("2-Changer l'affichage");
while (1 == 1){
char key = keypad.getKey();
if (key) {
if (key == '1') {
changePassword();
break;
} else if (key == '2') {
// Demande de changement de l'affichage du mot de passe
LCD.clear();
LCD.print("Affichage du mot de ");
LCD.setCursor(0,1);
LCD.print("passe :");
LCD.setCursor(0,2);
LCD.print("1 : '*'");
LCD.setCursor(0,3);
LCD.print("2 : 'Lettre'");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == '1'){
affichage_mdp_letter = false;
CleanLCD();
LCD.print("Mode de rendue : ");
LCD.setCursor(0,1);
LCD.print("Lettre");
LCD.setCursor(0,2);
LCD.print("Relancement du");
LCD.setCursor(0,3);
LCD.print("Shield Desk");
delay(1500);
OpenEnvironmentShieldDesk();
break;
}
else if (key == '2'){
affichage_mdp_letter = true;
CleanLCD();
LCD.print("Mode de rendue :");
LCD.setCursor(0,1);
LCD.print("Lettre");
LCD.setCursor(0,2);
LCD.print("Relancement du");
LCD.setCursor(0,3);
LCD.print("Shield Desk");
delay(1500);
OpenEnvironmentShieldDesk();
break;
}
}
}
delay(2000);
// TODO : Changer l'affichage du mot de passe
break;
}
}
}
} else if (key == '2') {
break;
} else if (key == '3') {
// TODO : Traitement pour ouvrir le boitier
}
}
}
}
void changePassword() {
CleanLCD();
LCD.print("Nouveau mot de passe:");
LCD.setCursor(0,1);
char new_password[5];
byte passwordIndex = 0;
while (true) {
char key = keypad.getKey();
if (key) {
if (key == '#') {
new_password[passwordIndex] = '\0'; // Terminer le nouveau mot de passe
strcpy(password, new_password); // Mettre à jour le mot de passe
CleanLCD();
LCD.print("Mot de passe change ");
LCD.setCursor(0,1);
LCD.print("avec succes ! ");
LCD.setCursor(0,2);
LCD.print("Relancement du ");
LCD.setCursor(0,1);
LCD.print("ShieldDesk dans 3 sec");
delay(2000);
break; // Sortir de la boucle lorsque le mot de passe est enregistré
} else if (passwordIndex < 4) {
new_password[passwordIndex] = key;
LCD.setCursor(passwordIndex, 1);
LCD.print('*'); // Afficher un * pour chaque caractère du mot de passe
passwordIndex++;
}
}
}
}
void EntrainementNoviceMusculation() {
CleanLCD();
LCD.print("A-Commencer");
LCD.setCursor(0, 1);
LCD.print("B-Sortir");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == 'A') {
LCD.clear();
LCD.setCursor(0, 0);
LCD.print("Le programme se");
LCD.setCursor(0, 1);
LCD.print("lancera dans 5 sec");
delay(5000);
LCD.clear();
LCD.setCursor(0,0);
LCD.print("appuyer sur 'a' pour");
LCD.setCursor(0,1);
LCD.print("passer a la suivante");
LCD.setCursor(0,2);
LCD.print("etape (pendant tous");
LCD.setCursor(0,3);
LCD.print("le programme)");
wait_press_A();
train_novice();
wait_press_A();
if (key == 'B') { // quitter
LCD.clear();
OpenEnvironmentShieldDesk();
}
}
}
}
}
void EntrainementIntermediaireMusculation() {
CleanLCD();
LCD.print("A-Commencer");
LCD.setCursor(0, 1);
LCD.print("B-Sortir");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == 'A') {
CleanLCD();
LCD.print("Le programme se");
LCD.setCursor(0, 1);
LCD.print("lancera dans 5 sec");
delay(5000);
LCD.clear();
LCD.setCursor(0,0);
LCD.print("appuyer sur 'a' pour");
LCD.setCursor(0,1);
LCD.print("passer a la suivante");
LCD.setCursor(0,2);
LCD.print("etape (pendant tous");
LCD.setCursor(0,3);
LCD.print("le programme)");
wait_press_A();
wait_press_A();
CleanLCD();
LCD.print("1/6 - pompes : x12");
wait_press_A();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("2/6 - squats : x15");
LCD.setCursor(0,1);
LCD.print("avec saut");
wait_press_A();
CleanLCD();
LCD.print("3/6 - Dips entre 2");
LCD.setCursor(0,1);
LCD.print("(chaises : x12 )");
wait_press_A();
CleanLCD();
LCD.print("4/6 - Planche avec");
LCD.setCursor(0,1);
LCD.print("élévation des bras");
LCD.setCursor(0,2);
LCD.print("alternée");
wait_press_A();
CleanLCD();
LCD.print("5/6 - Fentes sautées");
LCD.setCursor(0,1);
LCD.print("x12 / jambe");
wait_press_A();
CleanLCD();
LCD.print("5/6 - Fentes sautées");
LCD.setCursor(0,1);
LCD.print("x12 / jambe");
wait_press_A();
CleanLCD();
LCD.print("Votre entrainement");
LCD.setCursor(0, 1);
LCD.print("est finit !");
wait_press_A();
OpenEnvironmentShieldDesk();
}
if (key == 'B') { // quitter
LCD.clear();
OpenEnvironmentShieldDesk();
}
}
}
}
void EntrainementAvanceMusculation() {
CleanLCD();
LCD.print("A-Commencer");
LCD.setCursor(0, 1);
LCD.print("B-Sortir");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == 'A') {
CleanLCD();
LCD.print("Le programme se");
LCD.setCursor(0, 1);
LCD.print("lancera dans 5 sec");
delay(5000);
LCD.clear();
LCD.setCursor(0,0);
LCD.print("appuyer sur 'a' pour");
LCD.setCursor(0,1);
LCD.print("passer a la suivante");
LCD.setCursor(0,2);
LCD.print("etape (pendant tous");
LCD.setCursor(0,3);
LCD.print("le programme)");
train_avance();
CleanLCD();
LCD.print("Votre entrainement");
LCD.setCursor(0, 1);
LCD.print("est finit !");
wait_press_A();
OpenEnvironmentShieldDesk();
}
if (key == 'B') { // quitter
LCD.clear();
OpenEnvironmentShieldDesk();
}
}
}
}
void wait_press_A() {
while (1 == 1) { // A
char key = keypad.getKey();
if (key) {
if (key == 'A') {
break;
}
}
}
}
void CleanLCD() {
LCD.clear();
LCD.setCursor(0,0);
}
void train_novice(){
LCD.clear();
LCD.setCursor(0,0);
LCD.print("1/6 - pompes : x12");
wait_press_A();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("2/6 - squats : x15");
LCD.setCursor(0,1);
LCD.print("avec saut");
wait_press_A();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("3/6 - Dips entre 2");
LCD.setCursor(0,1);
LCD.print("(chaises : x12 )");
wait_press_A();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("4/6 - Planche avec");
LCD.setCursor(0,1);
LCD.print("élévation des bras");
LCD.setCursor(0,2);
LCD.print("alternée");
wait_press_A();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("5/6 - Fentes sautées");
LCD.setCursor(0,1);
LCD.print("x12 / jambe");
wait_press_A();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("6/6 - Élévations ");
LCD.setCursor(0,1);
LCD.print("latérales x12");
wait_press_A();
CleanLCD();
LCD.print("Votre tour est");
LCD.setCursor(0,1);
LCD.print("terminé");
LCD.setCursor(0,2);
LCD.print("A - partire");
LCD.setCursor(0,3);
LCD.print("B - recommencer");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == 'A') {
OpenEnvironmentShieldDesk();
}
if (key == 'B') {
CleanLCD();
LCD.print("Vous avez 45 sec");
LCD.setCursor(0, 1);
LCD.print("pour vous reposer");
delay(45000);
train_novice();
}
}
}
}
void train_intermediaire() {
wait_press_A();
CleanLCD();
LCD.print("1/4 - 10 pompes");
wait_press_A();
CleanLCD();
LCD.print("2/4 - 15 squats");
wait_press_A();
CleanLCD();
LCD.print("3/4 - 10 fentes");
LCD.setCursor(0,1);
LCD.print("(5 / jambe)");
wait_press_A();
CleanLCD();
LCD.print("4/4 - 15 seconde de");
LCD.setCursor(0,1);
LCD.print("planche");
wait_press_A();
CleanLCD();
LCD.print("Votre tour est");
LCD.setCursor(0,1);
LCD.print("terminé");
LCD.setCursor(0,2);
LCD.print("A - partire");
LCD.setCursor(0,3);
LCD.print("B - recommencer");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == 'A') {
OpenEnvironmentShieldDesk();
}
if (key == 'B') {
CleanLCD();
LCD.print("Vous avez 45 sec");
LCD.setCursor(0, 1);
LCD.print("pour vous reposer");
delay(45000);
train_intermediaire();
}
}
}
}
void train_avance() {
wait_press_A();
CleanLCD();
LCD.print("1/6 - pompes diamant");
LCD.setCursor(0, 1);
LCD.print("(mains rapprochées)");
LCD.setCursor(0,2);
LCD.print("x12");
wait_press_A();
LCD.clear();
LCD.setCursor(0,0);
LCD.print("2/6 - Pistol Squats");
LCD.setCursor(0,1);
LCD.print("x8 / jambe");
wait_press_A();
CleanLCD();
LCD.print("3/6 - Pull-up - x12");
wait_press_A();
CleanLCD();
LCD.print("4/6 - Planche en");
LCD.setCursor(0,1);
LCD.print("plan incliné (pied");
LCD.setCursor(0,2);
LCD.print("surélevés - 30 sec");
wait_press_A();
CleanLCD();
LCD.print("5/6 - Mountain");
LCD.setCursor(0,1);
LCD.print("climbers explosifs");
LCD.setCursor(0,2);
LCD.print("x15 / coté");
wait_press_A();
CleanLCD();
LCD.print("6/6 - Burpees avec");
LCD.setCursor(0,1);
LCD.print("saut en tuck - x8");
wait_press_A();
CleanLCD();
LCD.print("Votre tour est");
LCD.setCursor(0,1);
LCD.print("terminé");
LCD.setCursor(0,2);
LCD.print("A - partire");
LCD.setCursor(0,3);
LCD.print("B - recommencer");
while (1 == 1) {
char key = keypad.getKey();
if (key) {
if (key == 'A') {
OpenEnvironmentShieldDesk();
}
if (key == 'B') {
CleanLCD();
LCD.print("Vous avez 45 sec");
LCD.setCursor(0, 1);
LCD.print("pour vous reposer");
delay(45000);
train_avance();
}
}
}
}