a

Dependencies:   4DGL-uLCD-SE EthernetInterface mbed rtos

Revision:
2:14a8a5475978
Parent:
1:40b4ffe15e4e
Child:
3:7862ff3a9feb
--- a/main.cpp	Sat Jun 25 01:00:58 2016 +0000
+++ b/main.cpp	Sat Jun 25 03:04:03 2016 +0000
@@ -1,10 +1,35 @@
 #include "mbed.h"
 #include "uLCD_4DGL.h"
  
-Ethernet eth;
- 
+  
+uLCD_4DGL lcd(p9,p10,p11);
+
+//void basicLCD();
+//void BlinkLED();
+
 int main() 
 {
+    lcd.printf("hi");
+}
+
+
+void BlinkLED()
+{
+     DigitalOut myled(LED1);
+     
+     while(1) 
+     {
+        myled = 1;
+        wait(0.2);
+        myled = 0;
+        wait(0.2);
+    }   
+}
+
+
+void receiveFromEthernet()
+{
+    Ethernet eth;
     char buf[0x600];
  
     while(1) 
@@ -21,4 +46,54 @@
  
         wait(1);
     }
-}
\ No newline at end of file
+}
+
+
+void basicLCD()
+{
+    
+    
+    uLCD_4DGL lcd(p9,p10,p11);
+        
+    // Set our UART baudrate to something reasonable
+    lcd.baudrate(115200);
+
+    // Change background color (must be called before cls)
+    lcd.background_color(WHITE);
+
+    // Clear screen with background color
+    lcd.cls();
+    lcd.printf("hello");
+}
+
+void lcdFunction() 
+{
+    uLCD_4DGL lcd(p9,p10,p11);  
+    
+    // Set our UART baudrate to something reasonable
+    lcd.baudrate(115200);
+
+    // Change background color (must be called before cls)
+    lcd.background_color(WHITE);
+
+    // Clear screen with background color
+    lcd.cls();
+
+    // Change background color of text
+    lcd.textbackground_color(WHITE);
+
+    // Make some colorful text
+    lcd.locate(4, 1);      // Move cursor
+    lcd.color(BLUE);
+    lcd.printf("This is a\n");
+    lcd.locate(5, 3);      // Move cursor
+    lcd.text_width(2);     // 2x normal size
+    lcd.text_height(2);    // 2x normal size
+    lcd.color(RED);        // Change text color
+    lcd.printf("TEST");
+    lcd.text_width(1);     // Normal size
+    lcd.text_height(1);    // Normal size
+    lcd.locate(3, 6);      // Move cursor   
+    lcd.color(BLACK);      // Change text color
+    lcd.printf("of my new LCD");
+}