6ème partie - toujours pour dessiner et remettre à jour automatiquement les différents écrans de navigation
void drawHumidityscreen () {
// COTE Humidity min
myGLCD.setBackColor(0, 0, 0);
myGLCD.setFont(BigFont);
myGLCD.setColor(255,255,0);// Yellow
myGLCD.print("Humidity setpoint", 10, 10);
myGLCD.setFont(SmallFont);
myGLCD.print("MIN.", 10,50);
myGLCD.setColor(0,255,0);// Green
myGLCD.fillRect(20,80,50,90);// faire une forme de +
myGLCD.fillRect(30,70,40,100) ;
myGLCD.drawCircle (35,85,20);
myGLCD.setColor(255,0,0);
myGLCD.fillRect(20,210,50,220) ; // faire une forme de -
myGLCD.drawCircle (35,215,20);
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(9,130,60,180);
myGLCD.setFont(BigFont);//numéro 32x50 pixels
myGLCD.printNumI(NewHumidityMin,10,140);
//lignes de séparation min/max
myGLCD.setColor(255,255,54);
myGLCD.drawLine(80,60,80,310);
//lignes de séparation pH setpoint/parameters
myGLCD.setColor(255,255,54);
myGLCD.drawLine(178,60,178,310);
myGLCD.drawLine(182,60,182,310);
// Humidity MAX
myGLCD.setColor(255,255,0);
myGLCD.setFont(SmallFont);
myGLCD.print("MAX.",95,50);
myGLCD.setColor(0,255,0);// Green
myGLCD.fillRect(110,80,140,90);// faire une forme de +
myGLCD.fillRect(120,70,130,100) ;
myGLCD.drawCircle (125,85,20);
myGLCD.setColor(255,0,0);
myGLCD.fillRect(110,210,140,220) ; // faire une forme de -
myGLCD.drawCircle (125,215,20);
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(100,130,150,180);
myGLCD.setFont(BigFont);//numéro 32x50 pixels
myGLCD.printNumI(NewHumidityMax,101,140);
myGLCD.setFont(SmallFont);
myGLCD.print("Humidifier:",200,60);
myGLCD.print("Pin 12",220,80);
//myGLCD.printI(,240,60);
myGLCD.print("Extractor:",200,110);
myGLCD.print("Pin 14",220,130);
//myGLCD.printI(,210,80);
myGLCD.print("Hysterisis : ",200,160);
myGLCD.print("2%",240,180);
myGLCD.setFont(SmallFont);
myGLCD.print("SAVE",280,20);
//myGLCD.print("HOME",280,220);
myFiles.load(270,195,40,40,"home.raw", 1);
}
void drawRefreshHumidityscreen () {
myGLCD.setColor(255,255,255);
myGLCD.setFont(BigFont);//numéro 32x50 pixels
myGLCD.printNumI(NewHumidityMax,101,140);
myGLCD.printNumI(NewHumidityMin,10,140);
}
void drawPHandECscreen(){
//Title
myGLCD.setColor(0, 172, 51); // Sets color to green & blue
myGLCD.fillRoundRect(3,3,317,22);
myGLCD.drawRect(1,1,319,239);
myGLCD.setBackColor(0, 172, 51);
myGLCD.setColor(255, 255, 255);
myGLCD.setFont(SmallFont);
myGLCD.print("Hydroponics controller", 65, 3);
myGLCD.setBackColor(0, 0, 0);
//settings
myGLCD.setFont(BigFont);
myGLCD.print("settings", 10, 60);
// Button pH
myGLCD.setColor(0,150,200);
myGLCD.fillRoundRect(60,100,130,160);
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(60,100,130,160);
myGLCD.setBackColor(0,150,200);
myGLCD.setFont(BigFont);
myGLCD.print("pH", 65,125);
//Button EC
myGLCD.setColor(0,150,200);
myGLCD.fillRoundRect(190,100,260,160);
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(190,100,260,160);
myGLCD.setBackColor(0,150,200);
myGLCD.print("EC", 195,125);
//Button Home
myGLCD.setFont(SmallFont);
myGLCD.setBackColor(0,0,0);
//myGLCD.print("HOME",280,220);
myFiles.load(270,195,40,40,"home.raw", 1);
}
void drawPHscreen () {
// COTE pH min
myGLCD.setBackColor(0, 0, 0);
myGLCD.setFont(BigFont);
myGLCD.setColor(255,255,0);// Yellow
myGLCD.print("PH setpoint", 10, 10);
myGLCD.setFont(SmallFont);
myGLCD.print("MIN.", 10,50);
myGLCD.setColor(0,255,0);// Green
myGLCD.fillRect(20,80,50,90);// faire une forme de +
myGLCD.fillRect(30,70,40,100) ;
myGLCD.drawCircle (35,85,20);
myGLCD.setColor(255,0,0);
myGLCD.fillRect(20,210,50,220) ; // faire une forme de -
myGLCD.drawCircle (35,215,20);
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(9,130,60,180);
myGLCD.setFont(BigFont);//numéro 32x50 pixels
myGLCD.printNumF(pHmin,1,10,140);
//lignes de séparation min/max
myGLCD.setColor(255,255,54);
myGLCD.drawLine(80,60,80,310);
//lignes de séparation pH setpoint/parameters
myGLCD.setColor(255,255,54);
myGLCD.drawLine(178,60,178,310);
myGLCD.drawLine(182,60,182,310);
// pH MAX
myGLCD.setColor(255,255,0);
myGLCD.setFont(SmallFont);
myGLCD.print("MAX.",95,50);
myGLCD.setColor(0,255,0);// Green
myGLCD.fillRect(110,80,140,90);// faire une forme de +
myGLCD.fillRect(120,70,130,100) ;
myGLCD.drawCircle (125,85,20);
myGLCD.setColor(255,0,0);
myGLCD.fillRect(110,210,140,220) ; // faire une forme de -
myGLCD.drawCircle (125,215,20);
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(100,130,150,180);
myGLCD.setFont(BigFont);//numéro 32x50 pixels
myGLCD.printNumF(pHmax,1,101,140);
myGLCD.setFont(SmallFont);
myGLCD.print("SAVE",280,20);
//myGLCD.print("HOME",280,220);
myFiles.load(270,195,40,40,"home.raw", 1);
// Button for pH sensor calibration
myGLCD.setColor(0,50,200);
myGLCD.setBackColor(0,50,200);
myGLCD.fillRoundRect(202,82,298,123) ;
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(202,82,298,123);
myGLCD.print("pH sensor ",210,90);
myGLCD.print("calibration",205,110);
myGLCD.setColor(255,255,255); // button for pH pumps calibration
myGLCD.setColor(0,50,200);
myGLCD.setBackColor(0,50,200);
myGLCD.fillRoundRect(202,152,298,193) ;
myGLCD.setColor(255,255,255);
myGLCD.drawRoundRect(202,152,298,193) ;
myGLCD.print("pH pumps ",210,160);
myGLCD.print("calibration",205,180);
myGLCD.setBackColor(0, 0, 0);//retour au fond d'écriture black
}