for ros integration

Dependencies:   wheelchaircontrolRos

Fork of wheelchaircontrolrealtime by ryan lin

Revision:
8:347b10e6bdf8
Parent:
7:cead0e7b0c1e
Child:
9:90bc440405b6
--- a/main.cpp	Mon Aug 27 04:48:25 2018 +0000
+++ b/main.cpp	Mon Aug 27 23:12:06 2018 +0000
@@ -7,6 +7,7 @@
 DigitalOut off(D11);
 DigitalOut up(D2);
 DigitalOut down(D3);
+DigitalOut horn(D10);
 
 Serial pc(USBTX, USBRX, 57600);
 Timer t;
@@ -76,10 +77,12 @@
 
             else if( c == 'r') {
                 smart.pid_right(90);
+                c = 'z';
             }
 
             else if( c == 'l') {
                 smart.pid_left(90);
+                c = 'z';
             }
 
             else if( c == 't') {
@@ -135,15 +138,21 @@
             //        pc.printf("Nothing pressed \n");
             smart.stop();
         }
+        nh.spinOnce();
         wait(process);
     }
 
 }
 
+void beep() {
+    horn = 1;
+    wait(1);
+    horn =0;
+    }
+
 
 
 
 
 
 
-