SmartREST client reference implementation for the u-blox C027 mbed compatible device.
Dependencies: C027 C027_Support mbed mbed-rtos MbedSmartRest LM75B MMA7660 C12832
Fork of MbedSmartRestTest by
Diff: io.cpp
- Revision:
- 19:7bee744fe527
- Parent:
- 18:6bce406b3da2
- Child:
- 20:ef9cc1b42e9d
--- a/io.cpp Tue Feb 18 15:57:38 2014 +0000 +++ b/io.cpp Tue Feb 18 17:17:48 2014 +0000 @@ -8,8 +8,8 @@ MMA7660 accSensor(SDA,SCL); LM75B tempSensor(SDA,SCL); DigitalOut button(D4); -AnalogIn meter1(A0); -AnalogIn meter2(A1); +AnalogIn meter0(A0); +AnalogIn meter1(A1); RtosTimer *timer; @@ -58,6 +58,15 @@ return count; } +double potentiometer(uint8_t n) +{ + switch (n) { + case 0: return (double)meter0; + case 1: return (double)meter1; + default: return 0.0; + } +} + void timer_callback(void const*) { if ((!btnPressed) && (button))