Mise à jour de 'sujet'

master
Adryen DECHANDON 1 year ago
parent ade1429649
commit 36b4a2c73c

21
sujet

@ -8,6 +8,8 @@ int affluence = 0; // Initialize affluence to 0
int ancien_visit_total = 0;
int ancien_affluence = 0;
int y = Y_MAX/5;
int background = TFT_GREEN;
unsigned long myTimeInSec;
unsigned long myTimeInMin;
@ -18,7 +20,7 @@ unsigned long hour;
void setup() {
tft.begin();
tft.setRotation(3); // Set the screen orientation
tft.fillScreen(TFT_GREEN); // Green background
tft.fillScreen(background); // Green background
pinMode(WIO_KEY_A, INPUT_PULLUP);
pinMode(WIO_KEY_B, INPUT_PULLUP);
pinMode(WIO_KEY_C, INPUT_PULLUP);
@ -68,6 +70,14 @@ void visiteur() {
Serial.println("impossible d'être négatif !");
affluence = 0;
}
if(affluence < 10){
Serial.println("attention l'affluence à dépassé 10 !");
background = TFT_GREEN;
tft.fillScreen(background); // Green background
affiche();
affBandeauBleu();
affHeure();
}
efface();
affiche();
Serial.print("visit_total = ");
@ -80,6 +90,11 @@ void visiteur() {
visit_total = visit_total +1; // Increment visit_total
if(affluence > 10){
Serial.println("attention l'affluence à dépassé 10 !");
background = TFT_RED;
tft.fillScreen(background); // Green background
affiche();
affBandeauBleu();
affHeure();
}
efface();
affiche();
@ -99,7 +114,7 @@ void visiteur() {
etat = 0;
}
tft.setTextColor(TFT_GREEN);
tft.setTextColor(background);
tft.setTextSize(3);
tft.drawString("Confirmez ?", 110, 200);
efface();
@ -117,7 +132,7 @@ void ancien(){
ancien_affluence = affluence;
}
void efface(){
tft.setTextColor(TFT_GREEN);
tft.setTextColor(background);
tft.setTextSize(3);
tft.drawString("visit_total", 10, 100);
tft.drawNumber(ancien_visit_total, 250, 100);

Loading…
Cancel
Save