Demo of using the LCD of the application board
Fork of app-board-LCD by
Revision 4:69913788ef01, committed 2017-03-04
- Comitter:
- faif
- Date:
- Sat Mar 04 23:04:23 2017 +0000
- Parent:
- 3:2db94ee076ee
- Commit message:
- first LCD demo
Changed in this revision
lcd.cpp | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show diff for this revision Revisions of this file |
diff -r 2db94ee076ee -r 69913788ef01 lcd.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lcd.cpp Sat Mar 04 23:04:23 2017 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#include "C12832.h" + +C12832 lcd(p5, p7, p6, p8, p11); +static const float delay = 1; + +int main() +{ + int counter = 0; + lcd.cls(); + lcd.printf("hello world!"); + + while (true) + { + lcd.locate(0, 15); + lcd.printf("counter is: %d", ++counter); + wait(delay); + } +}
diff -r 2db94ee076ee -r 69913788ef01 main.cpp --- a/main.cpp Wed Feb 05 15:32:38 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -#include "mbed.h" -#include "C12832.h" - - -C12832 lcd(p5, p7, p6, p8, p11); - -int main() -{ - int j=0; - lcd.cls(); - lcd.locate(0,3); - lcd.printf("mbed application board!"); - - while(true) { // this is the third thread - lcd.locate(0,15); - lcd.printf("Counting : %d",j); - j++; - wait(1.0); - } -}