Example using the Seeed Grove slider

Dependencies:   mbed

Committer:
sam_grove
Date:
Fri Aug 15 15:46:07 2014 +0000
Revision:
0:46e460c85e27
Child:
1:401629079a98
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 0:46e460c85e27 1
sam_grove 0:46e460c85e27 2 #include "mbed.h"
sam_grove 0:46e460c85e27 3
sam_grove 0:46e460c85e27 4 AnalogIn pot(A0);
sam_grove 0:46e460c85e27 5
sam_grove 0:46e460c85e27 6 int main (void)
sam_grove 0:46e460c85e27 7 {
sam_grove 0:46e460c85e27 8 float value = 0.0f;
sam_grove 0:46e460c85e27 9
sam_grove 0:46e460c85e27 10 while(1) {
sam_grove 0:46e460c85e27 11 value = pot;
sam_grove 0:46e460c85e27 12 printf("Slide location %3.2f\n", value);
sam_grove 0:46e460c85e27 13 wait(0.5f);
sam_grove 0:46e460c85e27 14 }
sam_grove 0:46e460c85e27 15 }