Reproduces problem with having different analogIn in both ticker and main

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lanfear
Date:
Thu Feb 26 17:41:37 2015 +0000
Commit message:
Reproduces ticker/analogIn problem

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r a085abcfd4f8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Feb 26 17:41:37 2015 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+
+DigitalIn Button1(p21);    
+DigitalOut led1(LED1);
+
+AnalogIn Joystick1(p18);    
+AnalogIn Ain3(p15);
+
+float LFT;                 
+int LowBatteryCounter=0;
+
+Ticker VoltageCheck_tick;               
+
+void LowBatteryShutDown(void); 
+       
+
+int main() 
+{
+    VoltageCheck_tick.attach(&LowBatteryShutDown,0.5);  
+      
+    while(1) 
+    {
+       if (Button1==1)
+       {
+             LFT = Joystick1;
+       } 
+    }
+}
+
+void LowBatteryShutDown(void)  
+{
+    led1 = !led1;
+    
+    if(Ain3<=0.81)
+    {
+        LowBatteryCounter++;
+    }
+}
+
diff -r 000000000000 -r a085abcfd4f8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Feb 26 17:41:37 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file