Dependencies:   TextLCD mbed

Is here public?

Files at this revision

API Documentation at this revision

Comitter:
seethe
Date:
Mon Feb 10 07:27:24 2014 +0000
Commit message:
blink all leds

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
diff -r 000000000000 -r 498a45e38bed TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Mon Feb 10 07:27:24 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
diff -r 000000000000 -r 498a45e38bed main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 10 07:27:24 2014 +0000
@@ -0,0 +1,34 @@
+// Hello World! for the TextLCD
+
+#include "mbed.h"
+#include "TextLCD.h"
+
+//TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
+TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
+
+
+DigitalOut DO[4]={LED1, LED2, LED3, LED4};
+
+void led_blink()
+{
+    for(int n=0; n<4; n++){
+        DO[n] = !DO[n];
+    }
+}
+
+int main() {
+    double  cnt;
+    cnt = 0.1;
+    while(1){
+        lcd.printf("Hello World!_%.1f\n", cnt);
+        //lcd.printf("...\n");
+        led_blink();
+        wait(cnt);
+        lcd.printf("xxxxxxxxxxxx\n");
+        lcd.printf("...\n");
+        led_blink();
+        wait(cnt);
+        cnt+=0.1;
+        if(cnt>=1.0)  cnt = 0.1;
+    }
+}
diff -r 000000000000 -r 498a45e38bed mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Feb 10 07:27:24 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43
\ No newline at end of file