v1

Dependencies:   BEAR_Protocol_Edited BufferedSerial Debug MaxSonar PID Process QEI UI iSerial mbed

Fork of CleaningMachine_Betago by palm and chin

Files at this revision

API Documentation at this revision

Comitter:
icyzkungz
Date:
Mon Feb 15 17:48:23 2016 +0000
Child:
1:45f1573d65a1
Commit message:
first publish

Changed in this revision

BEAR_Protocol_Edited.lib Show annotated file Show diff for this revision Revisions of this file
Debug.lib Show annotated file Show diff for this revision Revisions of this file
Process.lib Show annotated file Show diff for this revision Revisions of this file
QEI.lib Show annotated file Show diff for this revision Revisions of this file
UI.lib Show annotated file Show diff for this revision Revisions of this file
iSerial.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BEAR_Protocol_Edited.lib	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/BEaR-lab/code/BEAR_Protocol/#6296cb35f853
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Debug.lib	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/Betago/code/Debug/#26532a4397da
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Process.lib	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/Betago/code/Process/#e4727bcb1054
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QEI.lib	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/aberk/code/QEI/#5c2ad81551aa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UI.lib	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/Betago/code/UI/#da168b469315
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iSerial.lib	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/BEaR-lab/code/iSerial/#1188a5024611
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,63 @@
+#include "Debug.h"
+#include "UI.h"
+#include "pinconfig.h"
+#include "BEAR_Protocol.h"
+
+DigitalIn button(USER_BUTTON);
+Serial pc(SERIAL_TX,SERIAL_RX);
+
+void DebugMode();
+
+int main()
+{
+    if(!button) {
+        while(!button);
+        DebugMode(); //-->Debug.h
+    }
+    
+    UI ui(SW_WALK1,SW_WALK2,SW_WALK3,SW_SWEEP,SW_WATER,EMERGENCY);
+    
+    pc.printf("System Start\n");
+    while(1)
+    {
+        while(!ui.getEmergencyStatus()) {
+            ui.RunSystem();
+        }
+    }
+}
+
+void DebugMode()
+{
+    float temp;
+    int option;
+    bool first_time = true;
+    Debug debug(SERIAL_TX,SERIAL_RX);
+    do {
+        debug.PrintListMode();
+        option = debug.ScanInputData(1);
+
+        if(option == 1) {
+            do {
+                temp = debug.Mode1();
+                debug.PrintAll(temp);
+            } while(temp!=9999);
+        }
+
+        else if(option == 2) {
+            do {
+                if(first_time==false) {
+                    temp = debug.Mode2();
+                    debug.PrintAll(temp);
+                } else {
+                    temp = debug.Mode2();
+                    if(temp!=0) first_time = false;
+                }
+
+                if(temp==9999) first_time = true;
+            } while(temp!=9999);
+        }
+
+
+        debug.setChange();
+    } while(option!=9999);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Feb 15 17:48:23 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file