Gerry Sweeney / Mbed 2 deprecated Test

main.cpp

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

File content as of revision 2:b414f32f0548:

#include "mbed.h"


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

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