Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Lab_6_WaG by
Diff: stepper.cpp
- 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
