This program can control the of Application board's joystick and the results can be checked on the LCD (C12832).
Revision 0:3cb0e69f1806, committed 2013-10-08
- Comitter:
- ssery
- Date:
- Tue Oct 08 11:13:01 2013 +0000
- Commit message:
- Simple joystick controller with LCD
Changed in this revision
diff -r 000000000000 -r 3cb0e69f1806 C12832_lcd.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832_lcd.lib Tue Oct 08 11:13:01 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/atthackathon/code/C12832_lcd/#3e64ca073642
diff -r 000000000000 -r 3cb0e69f1806 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 08 11:13:01 2013 +0000 @@ -0,0 +1,41 @@ +#include "mbed.h" +#include "C12832_lcd.h" + +// LCD and Joystick Setting +C12832_LCD lcd; + +BusIn Up(p15); +BusIn Down(p12); +BusIn Left(p13); +BusIn Right(p16); +BusOut Reset(p14); + +// Custom Function +void initialize(); + +// Main +int main() +{ + initialize(); + while(1) + { + lcd.locate(0,15); // Set Location print a text + // Operations by Joystic + if (Up) + lcd.printf("UP"); + if (Down) + lcd.printf("Down"); + if (Left) + lcd.printf("Left"); + if (Right) + lcd.printf("Right"); + if (Reset) + initialize(); + } +} +void initialize() +{ + lcd.cls(); + lcd.locate(0,0); + lcd.printf("Joystic and LCD Controller!"); +} \ No newline at end of file
diff -r 000000000000 -r 3cb0e69f1806 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 08 11:13:01 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file