Functions test with Optrex LCD 20x4
Dependents: DatatypesLength AsciiCode IntegerFormatSpecifiers FloatFormatSpecifier
Diff: main.cpp
- Revision:
- 1:a6effcf6c479
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 22 22:23:08 2010 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "OptrexLCD.h" + +DigitalOut BlinkLed(LED4); + +TextLCD lcd(p10, p12, p15, p16, p17, p18, TextLCD::LCD20x4 ); // rs, e, d0-d3 + +int main() { + lcd.printf("Start Hello World!\n"); + char teller = 0; + lcd.printf("Tweede regel? %d \n", teller); + wait(1.5); + + while(1){ + wait(0.5); + lcd.cls(); + lcd.printf("125 Hello World! \n"); + lcd.printf("Tweede regel? %d \n", teller); + lcd.printf("Derde regel? %d \n", (teller*3)); + lcd.printf("Vierde regel? \n"); + teller = teller++; + BlinkLed = !BlinkLed; + } +}