Dinko Djakovic, prikaz varijabli na LCD-u - brojac

Dependencies:   TextLCD mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

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