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 WaG by
Diff: main.cpp
- Revision:
- 49:80d4ffabec16
- Parent:
- 46:85c4b722baa7
- Child:
- 50:e3a03bc1e1a6
--- a/main.cpp Fri Mar 30 20:28:41 2018 +0000 +++ b/main.cpp Tue Apr 03 16:31:18 2018 +0000 @@ -38,6 +38,7 @@ BusOut mux_select(MUX_S0, MUX_S1, MUX_S2, MUX_S3); int station = -1; int *cal_status = NOT_CALIBRATED; +float sensor_values[TGT_SENSOR_QUAN * 2]; struct spi_cfg as1107{ SPI_AS1107_ID, @@ -59,26 +60,23 @@ pc.printf("Press user button to test.\n"); + /* test_target_leds(); pc.printf("LED's tested\n"); test_phototransistors(); pc.printf("Phototransistors tested\n"); + */ + step_test(); pc.printf("Step motor tested."); pc.printf("laser test\n"); - while(1){ - lzr_on(); - wait(0.5); - lzr_off(); - wait(0.5); - } - /* while (my_button.read() == 0); pc.printf("test begin\n"); lzr_init(); + wait(0.5); while (my_button.read() == 0) { lzr_on(); wait(0.5); @@ -86,7 +84,12 @@ wait(0.5); } lzr_init(); - */ + pc.printf("Laser tested.\n"); + // determine if the wag is connected to station A or station B station = station_select.read(); + + pc.printf("test part 9 begin\n"); + stp_calibrate(station, sensor_values, cal_status); + pc.printf("test part 9 done\n"); } \ No newline at end of file