LCD

Dependencies:   LCDLib mbed

Fork of KS0066U4_16x2 by Rune Langoy

Files at this revision

API Documentation at this revision

Comitter:
madmonkeyman82
Date:
Thu Oct 15 15:58:27 2015 +0000
Parent:
3:81d65a2a1920
Commit message:
first

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 81d65a2a1920 -r afa73d3e1a34 main.cpp
--- a/main.cpp	Mon Sep 21 10:18:03 2015 +0000
+++ b/main.cpp	Thu Oct 15 15:58:27 2015 +0000
@@ -2,15 +2,28 @@
  #include "TextLCD.h"
  
  TextLCD lcd(D11,D10,D9,D5,D4,D3,D2);
+ 
+
+ void BlinkCursor(bool);
+ 
  int main()
  {    
-    lcd.gotoxy(1,1);
-    lcd.printf("Hello");
+    int iCounter = 0;
+    
+    while(1) 
+    {
+        lcd.gotoxy(1,1);
+        lcd.printf("Nr: %d", iCounter);
+        lcd.gotoxy(1,2);
+        lcd.printf("Nr: %d", iCounter+1);
+        iCounter++;
+        wait_ms(500);
+    }
+ }
  
-    lcd.gotoxy(4,2);
-    lcd.printf("World");
-    
-    while(1) {
-        wait_ms(300);
-    }
- }
\ No newline at end of file
+ 
+ void BlinkCursor(bool OnOff)
+{
+    if(OnOff)lcd.lcdComand(0x0F);
+    else     lcd.lcdComand(0x0C);
+}
\ No newline at end of file