Yoshihiro TSUBOI
/
app-board-pot
a test code that read pot value with AnalogIn and display that on LCD of mbed Application Shield
Revision 0:84f51e352a37, committed 2016-01-22
- Comitter:
- ytsuboi
- Date:
- Fri Jan 22 10:11:17 2016 +0000
- Commit message:
- first commit
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Fri Jan 22 10:11:17 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/chris/code/C12832/#7de323fa46fe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jan 22 10:11:17 2016 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#include "C12832.h" + +C12832 lcd(p5, p7, p6, p8, p11); + +AnalogIn pot1 (p19); +AnalogIn pot2 (p20); + +int main() +{ + while(1) { + lcd.cls(); + lcd.locate(0,3); + lcd.printf("Pot 1 = %.2f", (float)pot1); + lcd.locate(0,14); + lcd.printf("Pot 2 = %.2f", (float)pot2); + wait(0.1); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jan 22 10:11:17 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96 \ No newline at end of file