Display test code

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
chinmay
Date:
Sun May 29 21:13:16 2011 +0000
Commit message:
20x4 LCD v1

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Sun May 29 21:13:16 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun May 29 21:13:16 2011 +0000
@@ -0,0 +1,38 @@
+#include "TextLCD.h"
+#include "mbed.h"
+
+
+TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD20x4); // rs, e, d4-d7
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+int main() {
+
+while(1)
+{
+   lcd.cls();
+   wait(0.5);
+   led1=1;
+   lcd.locate(0,0);
+   lcd.printf("Hello World1\n");
+   wait(5);
+   led2=1;
+   lcd.locate(6,1);
+   lcd.printf("Hello World2\n");
+   wait(5);
+   led3=1;
+   lcd.locate(0,2);
+   lcd.printf("Hello World3\n");
+   wait(5);
+   led4=1;
+   lcd.locate(8,3);
+   lcd.printf("Hello World4\n");
+   wait(0.5);
+   led1=0;
+   led2=0;
+   led3=0;
+   led4=0;
+   lcd.cls();
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun May 29 21:13:16 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912