Gerry Sweeney / Mbed 2 deprecated Test

main.cpp

Committer:
gerry_sweeney
Date:
2011-01-05
Revision:
1:292de2daf641
Parent:
0:e0139659d68c
Child:
2:b414f32f0548

File content as of revision 1:292de2daf641:

#include "mbed.h"


DigitalIn button(p21);
AnalogIn pot(p20);

int main() {
    while(pot > 0.0) {
        printf("Pot value = %f\n", pot.read());
        wait(0.1);
    }
    error("Loop unexpectedly terminated");
}