web server load-drive and reading sensors based on LPC1768
Dependencies: DHT22 EthernetNetIf HTTPServer mbed
Diff: LCDPrint/Print.cpp
- Revision:
- 0:3125f39d20b4
diff -r 000000000000 -r 3125f39d20b4 LCDPrint/Print.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LCDPrint/Print.cpp Mon Dec 07 14:06:24 2015 +0000 @@ -0,0 +1,95 @@ +#include "Print.h" +#include "Leitura.h" +#include "TextLCD.h" +#include "Atuadores.h" +//#include "ACS712.h" + +TextLCD lcd(p10, p9, p8, p7, p6, p5); + +void Print::imprimezero() +{ + lcd.cls(); +} + + +void Print::imprimeTexto() +{ + lcd.locate(0,0); + lcd.printf ("SIST. MONITORAMENTO"); + lcd.locate(0,1); + lcd.printf (" "); + lcd.locate(0,2); + lcd.printf (" "); + lcd.locate(0,3); + lcd.printf (" "); + } +void Print::imprimeTemp() +{ + if (err == 0) { + lcd.locate(0,1); + lcd.printf (" "); + lcd.locate(0,2); + lcd.printf("Temperatura:"); + lcd.printf("%d",szTemp); + lcd.printf("\nHumidade:"); + lcd.locate(12,3); + lcd.printf("%d",szUmid); + } else + lcd.printf("\nErr %i \n",err); + } + // } +void Print::imprimeCurr() +{ + // lcd.cls(); + lcd.locate(0,1); + lcd.printf("Corrente1: %s",Corrente); + lcd.printf(" A"); + lcd.locate(0,2); + lcd.printf("Corrente2: %s",Corrente2); + lcd.printf(" A"); + lcd.locate(0,3); + lcd.printf("Corrente3: %s",Corrente3); + lcd.printf(" A"); + // lcd.locate(0,1); + // lcd.printf("Tensao:",Tensao); +} + +void Print::imprimeCC() + { + lcd.locate(0,1); + lcd.printf("Baterias: %.2f",Tcc); + lcd.printf(" V"); + lcd.locate(0,2); + if (AC == 1) { + lcd.printf("Rede Eletrica : ON"); } + else if (AC == 0){ + lcd.printf("Rede Eletrica : OFF"); } + lcd.locate(0,3); + lcd.printf (" "); + } + +void Print::imprimeAviso() +{ + // lcd.locate(0,0); + // lcd.printf ("SIST. MONITORAMENTO "); + lcd.locate(0,1); + lcd.printf ("Atuador ativado de "); + lcd.locate(0,2); + lcd.printf ("forma manual e sera "); + lcd.locate(0,3); + lcd.printf ("desativado em 8:00h "); + lcd.locate(0,0); + } + + void Print::imprimeAviso2() +{ + //lcd.locate(0,0); + //lcd.printf ("SIST. MONITORAMENTO "); + lcd.locate(0,1); + lcd.printf ("Atuador desastivado "); + lcd.locate(0,2); + lcd.printf ("manualmente e sera "); + lcd.locate(0,3); + lcd.printf ("reativado em 0:30h "); + lcd.locate(0,0); + } \ No newline at end of file