Rob Toulson
/
RealTimeLab05_Display
Real Time Lab Program
Diff: main.cpp
- Revision:
- 0:b5e206fd1d2c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jan 25 16:27:59 2015 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#include "C12832_lcd.h" + +C12832_LCD lcd; + +int i=0; + +int main() +{ + + lcd.printf("Hello Colluders!"); + + lcd.locate(0,20); + lcd.printf("Here's a counter: "); + + while(1) { + + lcd.locate(100,20); + i=i+1; + lcd.printf("%3d",i); + wait(0.2); + if (i==999) { + i=0; + } + } +}