for ros integration

Dependencies:   wheelchaircontrolRos

Fork of wheelchaircontrolrealtime by ryan lin

Files at this revision

API Documentation at this revision

Comitter:
ryanlin97
Date:
Fri Aug 31 19:42:08 2018 +0000
Parent:
10:0d2dd5a774a3
Commit message:
for alexa and path;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
wheelchaircontrol.lib Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Aug 30 03:44:22 2018 +0000
+++ b/main.cpp	Fri Aug 31 19:42:08 2018 +0000
@@ -13,7 +13,12 @@
 Timer t;
 Thread thread;
 EventQueue queue;
-Wheelchair smart(xDir,yDir, &pc, &t);
+
+QEI wheel(D0, D1, NC, 1200);
+DigitalIn pt3(D1, PullUp);
+DigitalIn pt4(D0, PullUp);
+
+Wheelchair smart(xDir,yDir, &pc, &t, &wheel);
 
 char c;
 bool manual = false;
@@ -133,14 +138,24 @@
                     }
                 }
             }
-
+        else if( c == 'k') {
+            smart.kitchen();
+            
+            c = 'z';
+            }
+        else if( c == 'i') {
+            smart.desk();
+            }
+        else if( c == 'c') {
+            smart.back();
+            }
             else {
                 pc.printf("none \n");
                 smart.stop();
             }
             received = false;
         }
-
+        
         else {
             //        pc.printf("Nothing pressed \n");
             smart.stop();
--- a/wheelchaircontrol.lib	Thu Aug 30 03:44:22 2018 +0000
+++ b/wheelchaircontrol.lib	Fri Aug 31 19:42:08 2018 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/ryanlin97/code/wheelchaircontrolRos/#b7a5e4019cae
+https://os.mbed.com/users/ryanlin97/code/wheelchaircontrolRos/#69df88af7c46