Code for our FYDP -only one IMU works right now -RTOS is working
bt_shell/machine_interface/keybindings.h@0:964eb6a2ef00, 2015-03-18 (annotated)
- Committer:
- majik
- Date:
- Wed Mar 18 22:23:48 2015 +0000
- Revision:
- 0:964eb6a2ef00
This is our FYDP code, but only one IMU works with the RTOS.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
majik | 0:964eb6a2ef00 | 1 | /** This file contains the keybindings/commands for the python interface |
majik | 0:964eb6a2ef00 | 2 | **/ |
majik | 0:964eb6a2ef00 | 3 | |
majik | 0:964eb6a2ef00 | 4 | #ifndef KEYBINDINGS_H |
majik | 0:964eb6a2ef00 | 5 | #define KEYBINDINGS_H |
majik | 0:964eb6a2ef00 | 6 | |
majik | 0:964eb6a2ef00 | 7 | #define CONNECTION '?' //leave this as question mark. Returns confirmation of connection when sent |
majik | 0:964eb6a2ef00 | 8 | #define END_CONNECTION '$' //end connection |
majik | 0:964eb6a2ef00 | 9 | |
majik | 0:964eb6a2ef00 | 10 | //sensors |
majik | 0:964eb6a2ef00 | 11 | #define ALL_SENSOR 'A' //returns all sensor data: |
majik | 0:964eb6a2ef00 | 12 | #define IMU_READ 'i' //returns the IMU data in the form XXX.XXX,YYY.YYY,ZZZ.ZZZ,xxx.xxx,yyy.yyy.zzz.zzz [m/s2],[rad/s] |
majik | 0:964eb6a2ef00 | 13 | #define IMU_YAW 'Y' //returns only the YAW |
majik | 0:964eb6a2ef00 | 14 | #define IMU_CALIBRATE 'U' //calibrates IMU |
majik | 0:964eb6a2ef00 | 15 | #define OPT_CALIBRATE 'u' //calibrate optical flow |
majik | 0:964eb6a2ef00 | 16 | |
majik | 0:964eb6a2ef00 | 17 | #define IR_READ 'I' //returns the IR sensor data in the form 000.000,000.000... [cm] for the 5 IR sensors |
majik | 0:964eb6a2ef00 | 18 | #define IR_1 'L' //left IR |
majik | 0:964eb6a2ef00 | 19 | #define IR_2 'C' //right IR |
majik | 0:964eb6a2ef00 | 20 | #define IR_3 'R' //centre IR |
majik | 0:964eb6a2ef00 | 21 | #define IR_4 'r' //rear right IR |
majik | 0:964eb6a2ef00 | 22 | #define IR_5 'l' //rear left IR |
majik | 0:964eb6a2ef00 | 23 | |
majik | 0:964eb6a2ef00 | 24 | #define CURRENT_SENSE 'c' //returns current [mA] |
majik | 0:964eb6a2ef00 | 25 | #define OPT_READ 'O' //returns the velocity of each optical flow sensor X1,Y1,x2,y2 [pixels per second] |
majik | 0:964eb6a2ef00 | 26 | #define LOCATION 'q' //returns the current (x,y) location of robot [cm] (needs to be implemented) |
majik | 0:964eb6a2ef00 | 27 | |
majik | 0:964eb6a2ef00 | 28 | //commands |
majik | 0:964eb6a2ef00 | 29 | //#define IMU_CTRL 'q' //Toggle the IMU to keep the robot driving straight |
majik | 0:964eb6a2ef00 | 30 | #define MOTOR_R 'd' //Command to run right motor |
majik | 0:964eb6a2ef00 | 31 | #define MOTOR_L 'a' //Command to run left motor |
majik | 0:964eb6a2ef00 | 32 | #define MOTOR 'w' //Command to run both motors - specify both speeds |
majik | 0:964eb6a2ef00 | 33 | |
majik | 0:964eb6a2ef00 | 34 | //#define MOTOR_FWD 'W' //Command to run both motors straight forward |
majik | 0:964eb6a2ef00 | 35 | //#define ROTATE 'A' //Command to rotate by specified rotation [degrees] |
majik | 0:964eb6a2ef00 | 36 | |
majik | 0:964eb6a2ef00 | 37 | #define MOTOR_STOP 's' //Command to stop both motors |
majik | 0:964eb6a2ef00 | 38 | #define GO_TO 'G' //Command robot to go to specified coordinate |
majik | 0:964eb6a2ef00 | 39 | |
majik | 0:964eb6a2ef00 | 40 | #endif |