u-blox / Mbed 2 deprecated MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

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))