by Rob Toulson and Tim Wilmshurst from textbook "Fast and Effective Embedded Systems Design: Applying the ARM mbed"
Diff: main.cpp
- Revision:
- 0:16b794fa12e0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 24 21:34:30 2013 +0000 @@ -0,0 +1,17 @@ +/* Program Example 8.6: LCD Counter example + */ + +#include "mbed.h" +#include "TextLCD.h" +TextLCD lcd(p19, p20, p21, p22, p23, p24); // rs, e, d0, d1, d2, d3 +int x=0; + +int main() { + lcd.printf("LCD Counter"); + while (1) { + lcd.locate(5,1); + lcd.printf("%i",x); + wait(0.01); + x++; + } +}