wheelchair code for driver assitance

Dependencies:   mbed

Fork of wheelchairalexa by ryan lin

Revision:
3:a5e71bfdb492
Parent:
2:c2d049efc266
Child:
5:e0ccaab3959a
--- a/main.cpp	Thu Jul 12 20:51:54 2018 +0000
+++ b/main.cpp	Mon Jul 16 20:46:42 2018 +0000
@@ -2,6 +2,9 @@
 
 Serial pc(USBTX, USBRX);
 
+AnalogIn x(A0);
+AnalogIn y(A1);
+
 DigitalOut off(D0);
 DigitalOut on(D1);
 DigitalOut up(D2);
@@ -13,7 +16,7 @@
 {
     on = 1;
     while(1){
-    if( pc.readable()) {
+ /*   if( pc.readable()) {
         char c = pc.getc();
         if( c == 'w') {
             pc.printf("up \n");
@@ -69,7 +72,8 @@
        pc.printf("Nothing pressed \n");
        smart.stop();
             }
-    
+   */
+    smart.move(x,y); 
     wait(process);
        }