Rob Toulson / Mbed 2 deprecated PE_08-06_LCDCounter

Dependencies:   TextLCD mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /* Program Example 8.6: LCD Counter example
00002                                                    */
00003 
00004 #include "mbed.h"
00005 #include "TextLCD.h"
00006 TextLCD lcd(p19, p20, p21, p22, p23, p24); // rs, e, d0, d1, d2, d3
00007 int x=0;
00008 
00009 int main() {
00010     lcd.printf("LCD Counter");
00011     while (1) {
00012         lcd.locate(5,1);
00013         lcd.printf("%i",x);
00014         wait(0.01);
00015         x++;
00016     }
00017 }