GroupA / Mbed 2 deprecated WaG_final

Dependencies:   mbed

Fork of Lab_6_WaG by GroupA

Revision:
72:aec869655869
Parent:
71:6ced854bebb2
Child:
74:8881f4aeb174
--- a/stepper.cpp	Mon Apr 23 20:16:41 2018 +0000
+++ b/stepper.cpp	Mon Apr 23 21:21:29 2018 +0000
@@ -240,7 +240,9 @@
 
             // scan all PT sensors again
             ana_scan_mux(sensor_values, TGT_SENSOR_QUAN * 2);
-
+            
+            wait(0.005);
+            
             for (int j = 0; j < TGT_SENSOR_QUAN; j++) {
                 if (sensor_values[sensor_no + j] * 3.3f > PTTHRESH) {
                     pc.printf("PT %d: %f %d\n", sensor_no + j, sensor_values[sensor_no + j] * 3.3f, stp_cur_pos);
@@ -330,4 +332,5 @@
     else if (target > stp_cur_pos) 
         while (target > stp_cur_pos) 
             stp_step(STP_CW); 
+    pc.printf("current_position: %d\n", stp_cur_pos);
 }
\ No newline at end of file