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: main.cpp
- Revision:
- 56:048b30c9f2a1
- Parent:
- 55:1a25dd75e309
- Child:
- 57:aef01bd9b3be
--- a/main.cpp Thu Apr 05 21:16:59 2018 +0000
+++ b/main.cpp Fri Apr 06 18:25:19 2018 +0000
@@ -8,7 +8,7 @@
* Purpose: Configures the dispaly for 4-digit display or motor control
*
* Created: 03/01/2018
-* Last Modified: 03/29/2018
+* Last Modified: 04/06/2018
*
******************************************************************************/
#include "mbed.h"
@@ -59,7 +59,7 @@
spi_send(as1107, 0x0300);
spi_send(as1107, 0x0400);
- /*
+
pc.printf("Press user button to test.\n");
test_target_leds();
@@ -67,10 +67,10 @@
test_phototransistors();
pc.printf("Phototransistors tested\n");
- */
+
step_test();
pc.printf("Step motor tested\n");
- /*
+
pc.printf("laser test\n");
while (my_button.read() == 0);
pc.printf("test begin\n");
@@ -88,7 +88,7 @@
// determine if the wag is connected to station A or station B
station = station_select.read();
pc.printf("station in main: %d\n", station);
- */
+
/** Part 9: calibration test **/
pc.printf("Part 9: calibration test begin.\n");
stp_calibrate(station, sensor_values, &cal_status);
@@ -111,8 +111,8 @@
pc.printf("Part 10: press user button to begin the test.\n");
while (uti_chk_ubutton() == 0);
while (uti_chk_ubutton() == 0) {
- int sensor_no = 0;
- if (station == STATION_B) sensor_no = 8;
+ int sensor_no = 8;
+ if (station == STATION_B) sensor_no = 0;
// move to the left most sensor
repeatability_test(0, cal_status);
