rtc
Ecran.cpp
- Committer:
- Asoumy
- Date:
- 2016-10-14
- Revision:
- 1:2babe1d342dc
- Child:
- 2:7ace46b4f4f3
File content as of revision 1:2babe1d342dc:
#include "mbed.h" #include "Ecran.h" #include "LCD_DISCO_F746NG.h" #include "TS_DISCO_F746NG.h" #include "ds1338.h" LCD_DISCO_F746NG lcd; ///////////////////////////// AFFICHAGE_DES_ECRANS//////////////////////////////////////////// void horloge(); char jour[6]; char mois[6]; char annee[6]; char heure[6]; char minute[6]; char seconde[6]; //////////////////premier ecran/////////////////////// void principal() { LCD_DISCO_F746NG lcd; lcd.Clear(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_BLACK); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"WELCOME TO LAOS PROJET", CENTER_MODE); } ///////FONTCTION QUI AFFICHE LE MODE UTILISATEUR ET LE MODE ADMINISTRATEUR/// void Ecranprincipal() { lcd.Clear(LCD_COLOR_WHITE); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.FillRect(0,0,239,272); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"ADMINISTRATOR", LEFT_MODE); lcd.SetBackColor(LCD_COLOR_BLACK); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.FillRect(240,0,240,272); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"USER ACCOUNT", RIGHT_MODE); } ////FONTCTION QUI AFFICHE LE MENU PRINCIPAL/////// void EcranAdminis() { lcd.Clear(LCD_COLOR_WHITE); //AFFICHAGE DU BOUTON POUR REGLER L'HEURE ET LA DATE lcd.SetTextColor(LCD_COLOR_BLACK); lcd.DrawRect(10,50,155,130); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_DARKCYAN); lcd.DisplayStringAt(13, LINE(3), (uint8_t *)"Adjust", LEFT_MODE); lcd.DisplayStringAt(13, LINE(4), (uint8_t *)"the date", LEFT_MODE); lcd.DisplayStringAt(13, LINE(5), (uint8_t *)"and time", LEFT_MODE); //AFFICHAGE DU BOUTON POUR REGLER LA FREQUENCE D'ENVOI SUR LA CARTE SD lcd.SetTextColor(LCD_COLOR_BLACK); lcd.DrawRect(170,50,158,130); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_DARKRED); lcd.DisplayStringAt(173, LINE(3), (uint8_t *)"Adjust ", LEFT_MODE); lcd.DisplayStringAt(173, LINE(4), (uint8_t *)"the ", LEFT_MODE); lcd.DisplayStringAt(173, LINE(5), (uint8_t *)"Delivery", LEFT_MODE); lcd.DisplayStringAt(173, LINE(6), (uint8_t *)"frequency", LEFT_MODE); //AFFICHAGE DU BOUTON POUR AFFICHAGER LES DONNEES ARRIVEES SUR LA CARTE lcd.SetTextColor(LCD_COLOR_BLACK); lcd.DrawRect(332, 50, 145,130); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_DARKGREEN); lcd.DisplayStringAt(333, LINE(3), (uint8_t *)"The ", LEFT_MODE); lcd.DisplayStringAt(333, LINE(4), (uint8_t *)"data", LEFT_MODE); lcd.DisplayStringAt(333, LINE(5), (uint8_t *)"display", LEFT_MODE); //AFFICHAGE DU BOUTON RETOUR lcd.SetTextColor(LCD_COLOR_DARKRED); lcd.FillRect(30, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKRED); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"BACK", LEFT_MODE); } void EcranUtilis() { lcd.Clear(LCD_COLOR_DARKGRAY); lcd.SetBackColor(LCD_COLOR_DARKGRAY); lcd.SetTextColor(LCD_COLOR_YELLOW); lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"THE DATA DISPLAY", CENTER_MODE); //AFFICHAGE DU BOUTON POUR AFFICHAGER LES DONNEES ARRIVEES SUR LA CARTE lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); //AFFICHAGE DU BOUTON RETOUR lcd.SetTextColor(LCD_COLOR_RED); lcd.FillRect(30, 210, 80,30); lcd.SetBackColor(LCD_COLOR_RED); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"BACK", LEFT_MODE); } ///////FONCTION QUI AFFICHE LE NOUVEL ECRAN APRES L'APPUIE DE SUR TIME DATE void Ecran2() { struct tm time; time.tm_sec=0; time.tm_min=0; time.tm_hour=14; time.tm_mday=10; time.tm_year=116; time.tm_mon=0; time.tm_wday=2; time.tm_yday=0; time.tm_isdst=0; lcd.Clear(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); sprintf(jour,"%02d",time.tm_mday); lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); sprintf(mois,"%02d",time.tm_mon); lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); sprintf(annee,"%04d",time.tm_year); lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); sprintf(heure,"%02d",time.tm_hour); lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); sprintf(minute,"%02d",time.tm_min); lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); sprintf(seconde,"%02d",time.tm_sec); lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); //AFFICHAGE DU BOUTON QUITTER lcd.SetTextColor(LCD_COLOR_DARKRED); lcd.FillRect(30, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKRED); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30,LINE(9), (uint8_t *)"BACK", LEFT_MODE); } void Ecran2_Day() { struct tm time; time.tm_sec=0; time.tm_min=28; time.tm_hour=14; time.tm_mday=10; time.tm_year=116; time.tm_mon=0; time.tm_wday=2; time.tm_yday=0; time.tm_isdst=0; lcd.Clear(LCD_COLOR_WHITE); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); sprintf(mois,"%02d",time.tm_mon); lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); sprintf(annee,"%04d",time.tm_year); lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); sprintf(heure,"%02d",time.tm_hour); lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); sprintf(minute,"%02d",time.tm_min); lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); sprintf(seconde,"%02d ",time.tm_sec); lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); lcd.SetBackColor(LCD_COLOR_BLUE); sprintf(jour,"%02d",time.tm_mday); lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); //AFFICHAGE DU BOUTON POUR AUGMENTER lcd.SetTextColor(LCD_COLOR_DARKBLUE); lcd.FillRect(145, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKBLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); //AFFICHAGE DU BOUTON POUR DIMINUER lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); lcd.FillRect(245, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); //AFFICHAGE DU BOUTON OK lcd.SetTextColor(LCD_COLOR_DARKGREEN); lcd.FillRect(360, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKGREEN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); } void Ecran2_Month() { struct tm time; time.tm_sec=0; time.tm_min=28; time.tm_hour=14; time.tm_mday=10; time.tm_year=116; time.tm_mon=0; time.tm_wday=2; time.tm_yday=0; time.tm_isdst=0; lcd.Clear(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); sprintf(jour,"%02d",time.tm_mday); lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); sprintf(annee,"%04d",time.tm_year); lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); sprintf(heure,"%02d",time.tm_hour); lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); sprintf(minute,"%02d",time.tm_min); lcd.DisplayStringAt(65, 115, (uint8_t *)":", LEFT_MODE); lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); sprintf(seconde,"%02d",time.tm_sec); lcd.DisplayStringAt(115, 164, (uint8_t *)"/", LEFT_MODE); lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); lcd.SetBackColor(LCD_COLOR_BLUE); sprintf(mois,"%02d",time.tm_mon); lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); //AFFICHAGE DU BOUTON POUR AUGMENTER lcd.SetTextColor(LCD_COLOR_DARKBLUE); lcd.FillRect(145, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKBLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); //AFFICHAGE DU BOUTON POUR DIMINUER lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); lcd.FillRect(245, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); //AFFICHAGE DU BOUTON OK lcd.SetTextColor(LCD_COLOR_DARKGREEN); lcd.FillRect(360, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKGREEN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); } void Ecran2_Year() { struct tm time; time.tm_sec=0; time.tm_min=28; time.tm_hour=14; time.tm_mday=10; time.tm_year=116; time.tm_mon=0; time.tm_wday=2; time.tm_yday=0; time.tm_isdst=0; lcd.Clear(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); sprintf(jour,"%02d",time.tm_mday); lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); sprintf(mois,"%02d",time.tm_mon); lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); sprintf(heure,"%02d",time.tm_hour); lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); sprintf(minute,"%02d",time.tm_min); lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); lcd.DisplayStringAt(115, 164, (uint8_t *)"/", LEFT_MODE); sprintf(seconde,"%02d",time.tm_sec); lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); lcd.SetBackColor(LCD_COLOR_BLUE); sprintf(annee,"%04d",time.tm_year); lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); //AFFICHAGE DU BOUTON POUR AUGMENTER lcd.SetTextColor(LCD_COLOR_DARKBLUE); lcd.FillRect(145, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKBLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); //AFFICHAGE DU BOUTON POUR DIMINUER lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); lcd.FillRect(245, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); //AFFICHAGE DU BOUTON OK lcd.SetTextColor(LCD_COLOR_DARKGREEN); lcd.FillRect(360, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKGREEN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); } void Ecran2_Hour() { struct tm time; time.tm_sec=0; time.tm_min=28; time.tm_hour=14; time.tm_mday=10; time.tm_year=116; time.tm_mon=0; time.tm_wday=2; time.tm_yday=0; time.tm_isdst=0; lcd.Clear(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); sprintf(jour,"%02d",time.tm_mday); lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); sprintf(mois,"%02d",time.tm_mon); lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); sprintf(annee,"%04d",time.tm_year); lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); sprintf(minute,"%02d",time.tm_min); lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); sprintf(seconde,"%02d",time.tm_sec); lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); lcd.SetBackColor(LCD_COLOR_BLUE); sprintf(heure,"%02d",time.tm_hour); lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); //AFFICHAGE DU BOUTON POUR AUGMENTER lcd.SetTextColor(LCD_COLOR_DARKBLUE); lcd.FillRect(145, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKBLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); //AFFICHAGE DU BOUTON POUR DIMINUER lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); lcd.FillRect(245, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); //AFFICHAGE DU BOUTON OK lcd.SetTextColor(LCD_COLOR_DARKGREEN); lcd.FillRect(360, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKGREEN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); } void Ecran2_Minutes() { struct tm time; time.tm_sec=0; time.tm_min=28; time.tm_hour=14; time.tm_mday=10; time.tm_year=116; time.tm_mon=0; time.tm_wday=2; time.tm_yday=0; time.tm_isdst=0; lcd.Clear(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); sprintf(jour,"%02d",time.tm_mday); lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); sprintf(mois,"%02d",time.tm_mon); lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); sprintf(annee,"%04d",time.tm_year); lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); sprintf(heure,"%02d",time.tm_hour); lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); sprintf(seconde,"%02d",time.tm_sec); lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); lcd.SetBackColor(LCD_COLOR_BLUE); sprintf(minute,"%02d",time.tm_min); lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); //AFFICHAGE DU BOUTON POUR AUGMENTER lcd.SetTextColor(LCD_COLOR_DARKBLUE); lcd.FillRect(145, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKBLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); //AFFICHAGE DU BOUTON POUR DIMINUER lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); lcd.FillRect(245, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); //AFFICHAGE DU BOUTON OK lcd.SetTextColor(LCD_COLOR_DARKGREEN); lcd.FillRect(360, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKGREEN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); } void Ecran2_Seconde() { struct tm time; lcd.Clear(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"TIME:", LEFT_MODE); sprintf(jour,"%02d",time.tm_mday); lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); sprintf(mois,"%02d",time.tm_mon); lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); sprintf(annee," %04d",time.tm_year); lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); lcd.DisplayStringAt(30, 135, (uint8_t *)"DATE:", LEFT_MODE); sprintf(heure,"%02d",time.tm_hour); lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); sprintf(minute,"%02d",time.tm_min); lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); lcd.SetBackColor(LCD_COLOR_BLUE); sprintf(seconde,"%02d ",time.tm_sec); lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); //AFFICHAGE DU BOUTON POUR AUGMENTER lcd.SetTextColor(LCD_COLOR_DARKBLUE); lcd.FillRect(145, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKBLUE); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); //AFFICHAGE DU BOUTON POUR DIMINUER lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); lcd.FillRect(245, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); //AFFICHAGE DU BOUTON OK lcd.SetTextColor(LCD_COLOR_DARKGREEN); lcd.FillRect(360, 210, 80,30); lcd.SetBackColor(LCD_COLOR_DARKGREEN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); } ///////FONCTION QUI AFFICHE LE NOUVEL ECRAN APRES L'APPUIE DE SUR FREQ void Ecran3() { lcd.Clear(LCD_COLOR_WHITE); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_DARKGRAY); lcd.DisplayStringAt(10, LINE(1), (uint8_t *)"Select the frequency of", CENTER_MODE); lcd.DisplayStringAt(10, LINE(2), (uint8_t *)"sending of the data on the", CENTER_MODE); lcd.DisplayStringAt(10, LINE(3), (uint8_t *)"SD card: ", CENTER_MODE); lcd.DisplayStringAt(30,120, (uint8_t *)"Per hour ", LEFT_MODE); lcd.DisplayStringAt(250, 120, (uint8_t *)"Per day", LEFT_MODE); lcd.DisplayStringAt(30, 160, (uint8_t *)"Per week ", LEFT_MODE); lcd.DisplayStringAt(250, 160, (uint8_t *)"Per month", LEFT_MODE); lcd.SetTextColor(LCD_COLOR_DARKRED); lcd.DrawRect(25, 115, 160, 30); lcd.DrawRect(245, 115, 160,30); lcd.DrawRect(25, 155, 160, 30); lcd.DrawRect(245, 155, 160,30); //AFFICHAGE DU BOUTON RETOUR lcd.SetBackColor(LCD_COLOR_DARKRED); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"BACK", LEFT_MODE); } void Ecran3_PerHour() { } void Ecran3_PerDay() { } void Ecran3_PerWeek() { } void Ecran3_PerMonth() { } ///////FONCTION QUI AFFICHE LE NOUVEL ECRAN APRES L'APPUIE DE SUR AFFICHAGE void Ecran4() { //AFFICHAGE DU BOUTON QUITTER lcd.SetTextColor(LCD_COLOR_RED); lcd.FillRect(30, 210, 80,30); lcd.SetBackColor(LCD_COLOR_RED); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"QUIT", LEFT_MODE); //AFFICHAGE DU BOUTON RETOUR lcd.SetTextColor(LCD_COLOR_CYAN); lcd.FillRect(145, 210, 80,30); lcd.SetBackColor(LCD_COLOR_CYAN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(145, LINE(9), (uint8_t *)"BACK", LEFT_MODE); //AFFICHAGE DU BOUTON SUIVANT lcd.SetTextColor(LCD_COLOR_CYAN); lcd.FillRect(245, 210, 80,30); lcd.SetBackColor(LCD_COLOR_CYAN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(245, LINE(9), (uint8_t *)"NEXT", LEFT_MODE); //AFFICHAGE DU BOUTON OK lcd.SetTextColor(LCD_COLOR_GREEN); lcd.FillRect(360, 210, 80,30); lcd.SetBackColor(LCD_COLOR_GREEN); lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); }