web server load-drive and reading sensors based on LPC1768

Dependencies:   DHT22 EthernetNetIf HTTPServer mbed

LCDPrint/Print.cpp

Committer:
douglasofranco
Date:
2015-12-07
Revision:
0:3125f39d20b4

File content as of revision 0:3125f39d20b4:

#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);
  }