GroupA / Mbed 2 deprecated Lab_6_WaG

Dependencies:   mbed

Fork of WaG by GroupA

Revision:
44:4c2ba5bbba67
Parent:
42:6cba679a4ee4
Child:
45:54d18ab80fd1
--- a/main.cpp	Thu Mar 29 15:51:52 2018 +0000
+++ b/main.cpp	Thu Mar 29 20:00:27 2018 +0000
@@ -19,6 +19,7 @@
 #include "utility.h"
 #include "analog.h"
 #include "laser.h"
+#include "wag.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -35,8 +36,9 @@
 DigitalOut laser(LZR_ENABLE);
 AnalogIn mux_out (MUX_OUT);
 BusOut mux_select(MUX_S0, MUX_S1, MUX_S2, MUX_S3);
-
-
+DigitalIn station_select(UI_STATION_SELECT);       //station variable (1 == STATION_A, 2 == STATION_B)
+int station = -1;
+int *cal_status = NOT_CALIBRATED;
 
 struct spi_cfg as1107{
     SPI_AS1107_ID,
@@ -76,4 +78,7 @@
         lzr_off();
         wait(0.5);
     }
+    
+    // determine if the wag is connected to station A or station B
+    station = station_select.read();
 } 
\ No newline at end of file