Slave Implementation of WANOT Slave

Dependencies:   SX1276Lib mbed-src

Revision:
0:80ebf9b1dd4f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 23 22:28:07 2016 +0000
@@ -0,0 +1,51 @@
+#include"WANOT.h"
+
+/*
+ *  Global variables declarations
+ */
+
+/*!
+ * Radio events function pointer
+ */
+RadioEvents_t RadioEvents;
+
+/*
+ *  Global variables declarations
+ */
+SX1276MB1xAS Radio(NULL);
+
+extern SuperSlotStates SuperSlotState;
+
+
+int main()
+{
+
+    // verify the connection with the board
+    while (Radio.Read(REG_VERSION) == 0x00) {
+        debug("Radio could not be detected!\n\r\r", NULL);
+        wait(1);
+    }
+    debug("WANOT Slave Started...\n\r");
+
+    char StoreRead[50];
+    GPS_Read(StoreRead);
+
+    SuperSlotInit();
+
+    while(1)    {
+        switch(SuperSlotState) {
+            case SetUp_Beacon_Phase:
+                SetUp_Beacon();
+                break;
+
+            case SetUp_Phase:
+                SlaveSetUp();
+                break;
+
+            case TDMA_Phase:
+                SlaveTDMA();
+                break;
+        }
+    }
+
+}
\ No newline at end of file