Mechatronics / Mbed 2 deprecated FRDM_wahadlo_torsyjne

Dependencies:   mbed BufferedSerial

Fork of FRDM_wahadlo_torsyjne by Wojciech M

Revision:
4:16316fb634a4
Parent:
3:2ba53b9a499a
Child:
5:1e2e73ac4bed
diff -r 2ba53b9a499a -r 16316fb634a4 main.cpp
--- a/main.cpp	Tue Jun 10 09:46:18 2014 +0000
+++ b/main.cpp	Tue Jun 10 09:50:41 2014 +0000
@@ -27,7 +27,7 @@
     int SWITCH_DIR = 120;
     
     while (true) {        
-        wait_ms(start);
+        wait_ms(SWITCH_DIR);
         pc.printf("%.4f\n", get_voltage_in(ain0));        
         
 //        pc.printf("a1:%d\n",ain1.read_u16());
@@ -35,8 +35,8 @@
         if (i_start == SWITCH_DIR) {
             myled = !myled;
             direction= !direction;
-            if (SWITCH_DIR == 120) SWIYCH_DIR = 240
-            i_start = 0
+            if (SWITCH_DIR == 120) SWITCH_DIR = 240;
+            i_start = 0;
             }