bernard rayappa
/
lcdmonitor
test file
Fork of TextLCD_HelloWorld by
Diff: main.cpp
- Revision:
- 5:1ad7d56050dd
- Parent:
- 3:bae19bde97d5
--- a/main.cpp Sat Apr 13 07:03:04 2013 +0000 +++ b/main.cpp Wed Nov 20 10:48:50 2013 +0000 @@ -3,16 +3,18 @@ #include "mbed.h" #include "TextLCD.h" -TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7 - +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(" This is 16x2!\n"); - lcd.printf("Jello World!\n"); - wait(1); - lcd.printf("Jello World! \n"); - lcd.printf("Hello World!\n"); - wait(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); } }