Luiz Carlos do Lago
/
teste_lcd
This program work with LCD e Timeout
Revision 0:e07fa0ef1293, committed 2011-07-02
- Comitter:
- luizlago
- Date:
- Sat Jul 02 21:49:05 2011 +0000
- Commit message:
- 1.0
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Sat Jul 02 21:49:05 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 Sat Jul 02 21:49:05 2011 +0000 @@ -0,0 +1,33 @@ +// Hello World! for the TextLCD + +#include "mbed.h" +#include "TextLCD.h" + +Timeout timeTick; +TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7 + +void onTimeout() { + static int estado = 0; + + if (estado == 0) + { + lcd.cls(); + lcd.printf("Hello World!!!"); + estado = 1; + timeTick.attach(&onTimeout, 1); + } + else + { + lcd.cls(); + estado = 0; + timeTick.attach(&onTimeout, 0.5); + } +} + +int main() { + + timeTick.attach(&onTimeout, 2); + + while(1) { + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Jul 02 21:49:05 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912