Example using single button touch sensor
Dependencies: mbed
Fork of Seeed_Grove_Slider_Potentiometer_Example by
Diff: main.cpp
- Revision:
- 0:46e460c85e27
- Child:
- 1:401629079a98
diff -r 000000000000 -r 46e460c85e27 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Aug 15 15:46:07 2014 +0000 @@ -0,0 +1,15 @@ + +#include "mbed.h" + +AnalogIn pot(A0); + +int main (void) +{ + float value = 0.0f; + + while(1) { + value = pot; + printf("Slide location %3.2f\n", value); + wait(0.5f); + } +}