El-POM1001
/
LAB05_Oppgave3
LCD
Fork of KS0066U4_16x2 by
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 00004 TextLCD lcd(D11,D10,D9,D5,D4,D3,D2); 00005 00006 00007 void BlinkCursor(bool); 00008 00009 int main() 00010 { 00011 int iCounter = 0; 00012 00013 while(1) 00014 { 00015 lcd.gotoxy(1,1); 00016 lcd.printf("Nr: %d", iCounter); 00017 lcd.gotoxy(1,2); 00018 lcd.printf("Nr: %d", iCounter+1); 00019 iCounter++; 00020 wait_ms(500); 00021 } 00022 } 00023 00024 00025 void BlinkCursor(bool OnOff) 00026 { 00027 if(OnOff)lcd.lcdComand(0x0F); 00028 else lcd.lcdComand(0x0C); 00029 }
Generated on Thu Jul 14 2022 18:39:39 by 1.7.2