test file

Dependencies:   TextLCD mbed

Fork of TextLCD_HelloWorld by Srinivasan Ramasamy

main.cpp

Committer:
ramsphd
Date:
2013-11-20
Revision:
5:1ad7d56050dd
Parent:
3:bae19bde97d5

File content as of revision 5:1ad7d56050dd:

// Hello World! for the TextLCD

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

TextLCD lcd(p25, p26, p24, p23, p22, p21); // rs, e, d4-d7
Serial pc(USBTX,USBRX);
AnalogIn voltage(p15);
int main() 
{
while (1){
    lcd.printf("Voltage in fraction: %2.4f\n", voltage.read());
    pc.printf("Voltage in fraction: %2.4f\n", voltage.read());
    
    wait(5);
    lcd.printf("Voltage in integer: %6d\n", voltage.read_u16());
    pc.printf("Voltage in integer: %6d\n", voltage.read_u16());
    wait(5);
}
}