Michael Pascual / Mbed 2 deprecated lcd

Dependencies:   mbed

main.cpp

Committer:
mpascual
Date:
2010-10-16
Revision:
3:6854a442d2c6
Parent:
2:6072f52037b0

File content as of revision 3:6854a442d2c6:

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

TextLCD lcd(p10, p12, p15, p16, p29, p30, TextLCD::LCD20x2); // rs, e, d0-d3
AnalogIn ain(p20);


int main() {
    //while(1) {
    lcd.cls();
    lcd.locate(7, 0);
    lcd.printf("Percent is");  
    lcd.locate(9, 1);
    lcd.printf("%.3f\n",100*ain.read());

    //lcd.printf("Percent is %.1f\n",100*ain.read());
    //lcd.printf("Voltage is %.3f\n",3.3*ain.read());
}
//}