Mise à jour de 'sujet'

master
Adryen DECHANDON 1 year ago
parent b83c1b3262
commit c63e05d7b4

24
sujet

@ -2,16 +2,7 @@
#include "RTC_SAMD51.h"
#include "DateTime.h"
void message(){
String val;
val = Serial.readString();
Serial.print(val);
if(val != NULL){
tft.setTextColor(TFT_BLACK);
tft.setTextSize(3);
tft.drawString("Nouveau Message !", 10, 50);
}
}
RTC_SAMD51 rtc;
int X_MAX = 320;
@ -30,6 +21,7 @@ DateTime now = DateTime(F(__DATE__), F(__TIME__));
void setup() {
rtc.begin();
tft.begin();
tft.setRotation(3); // Set the screen orientation
@ -51,12 +43,14 @@ void setup() {
affBandeauBleu();
affHeure();
rtc.adjust(now);
Serial.setTimeout(10);
}
void loop() {
visiteur();
affHeure();
message15();
message();
}
@ -81,6 +75,16 @@ void affHeure() {
tft.drawNumber(now.minute(), 285, 10);
}
void message(){
String val;
val = Serial.readString();
Serial.print(val);
if(val != NULL){
tft.setTextColor(TFT_BLACK);
tft.setTextSize(3);
tft.drawString("Nouveau Message !", 10, 50);
}
}
void message15(){
if(now.minute() == 0 || now.minute() == 15 || now.minute() == 30 || now.minute() == 45 || now.minute() == 60){

Loading…
Cancel
Save