Teste de escrita em LCD.
Revision 0:bc250f368b02, committed 2014-05-10
- Comitter:
- Charrua
- Date:
- Sat May 10 17:50:20 2014 +0000
- Commit message:
- Teste de escrita em LCD, e aende e apaga LEDs
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Sat May 10 17:50:20 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat May 10 17:50:20 2014 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(PTE30, PTE29, PTE23, PTE22, PTE21, PTE20, TextLCD::LCD16x2); // rs, e, d4-d7
+DigitalOut ledA(LED3);
+DigitalOut ledB(LED2);
+
+int main() {
+ ledA=0;
+ ledB=1;
+ while(true) {
+ ledA=!ledA;
+ ledB=!ledB;
+ lcd.printf("Hello World!");
+ lcd.locate(0,1);
+ lcd.printf(" Charrua :)");
+ wait(5);
+ lcd.cls();
+ ledA=!ledA;
+ ledB=!ledB;
+ lcd.printf("E.N.I.D.H.");
+ lcd.locate(0,1);
+ lcd.printf("Dep. Eng. Marit.");
+ wait(3);
+ lcd.cls();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat May 10 17:50:20 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file