temp adc and preesure on lcd 20*4 also 16*4

Dependencies:   KS0108 SCP1000 TextLCD mbed

Fork of TextLCD_ADC by Pallavi Sudhakar

main.cpp

Committer:
drrifat
Date:
2013-08-28
Revision:
5:746a38bc5a10
Parent:
4:206beeaf992b

File content as of revision 5:746a38bc5a10:

#include "SCP1000.h"
#include "mbed.h"
#include "TextLCD.h" 


TextLCD lcd(p26, p25, p24, p23, p22, p21,TextLCD::LCD20x4); // rs, e, d4-d7
 
SCP1000 scp1000(p5,p6,p7,p8);
AnalogIn ain (p20);

//Serial rn42(p9,p10);


int main() 
{
    rn42.baud(57600);
    lcd.locate(0, 0);
    lcd.printf("This is version 1.0\n");
    lcd.locate(0, 1);
    lcd.printf("of the spi host test\n");
     wait(0.75);
   lcd.cls();
      while (1){ 
        
                 lcd.locate(0, 0);
                 lcd.printf("%.2f\n", ain.read());
                 lcd.locate(0, 1);
                 lcd.printf("%d Pa ", scp1000.readPressure());
                 lcd.locate(0, 2);
                 lcd.printf("%f C",  scp1000.readTemperature());
                        
                     }
                      
}