Real Time Lab Program

Dependencies:   C12832_lcd mbed

Committer:
robt
Date:
Sun Jan 25 16:27:59 2015 +0000
Revision:
0:b5e206fd1d2c
Real Time Lab Program

Who changed what in which revision?

UserRevisionLine numberNew contents of line
robt 0:b5e206fd1d2c 1 #include "mbed.h"
robt 0:b5e206fd1d2c 2 #include "C12832_lcd.h"
robt 0:b5e206fd1d2c 3
robt 0:b5e206fd1d2c 4 C12832_LCD lcd;
robt 0:b5e206fd1d2c 5
robt 0:b5e206fd1d2c 6 int i=0;
robt 0:b5e206fd1d2c 7
robt 0:b5e206fd1d2c 8 int main()
robt 0:b5e206fd1d2c 9 {
robt 0:b5e206fd1d2c 10
robt 0:b5e206fd1d2c 11 lcd.printf("Hello Colluders!");
robt 0:b5e206fd1d2c 12
robt 0:b5e206fd1d2c 13 lcd.locate(0,20);
robt 0:b5e206fd1d2c 14 lcd.printf("Here's a counter: ");
robt 0:b5e206fd1d2c 15
robt 0:b5e206fd1d2c 16 while(1) {
robt 0:b5e206fd1d2c 17
robt 0:b5e206fd1d2c 18 lcd.locate(100,20);
robt 0:b5e206fd1d2c 19 i=i+1;
robt 0:b5e206fd1d2c 20 lcd.printf("%3d",i);
robt 0:b5e206fd1d2c 21 wait(0.2);
robt 0:b5e206fd1d2c 22 if (i==999) {
robt 0:b5e206fd1d2c 23 i=0;
robt 0:b5e206fd1d2c 24 }
robt 0:b5e206fd1d2c 25 }
robt 0:b5e206fd1d2c 26 }