Code for our FYDP -only one IMU works right now -RTOS is working

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers keybindings.h Source File

keybindings.h

00001 /** This file contains the keybindings/commands for the python interface
00002 **/
00003 
00004 #ifndef KEYBINDINGS_H
00005 #define KEYBINDINGS_H
00006 
00007 #define CONNECTION  '?'     //leave this as question mark. Returns confirmation of connection when sent
00008 #define END_CONNECTION '$'  //end connection
00009 
00010 //sensors
00011 #define ALL_SENSOR  'A'     //returns all sensor data: 
00012 #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]
00013 #define IMU_YAW     'Y'     //returns only the YAW
00014 #define IMU_CALIBRATE 'U'   //calibrates IMU
00015 #define OPT_CALIBRATE 'u'   //calibrate optical flow
00016 
00017 #define IR_READ     'I'     //returns the IR sensor data in the form 000.000,000.000... [cm] for the 5 IR sensors
00018 #define IR_1        'L'    //left IR
00019 #define IR_2        'C'     //right IR
00020 #define IR_3        'R'     //centre IR
00021 #define IR_4        'r'     //rear right IR
00022 #define IR_5        'l'     //rear left IR
00023 
00024 #define CURRENT_SENSE 'c'   //returns current [mA]
00025 #define OPT_READ    'O'     //returns the velocity of each optical flow sensor X1,Y1,x2,y2 [pixels per second]
00026 #define LOCATION    'q'     //returns the current (x,y) location of robot [cm] (needs to be implemented)
00027 
00028 //commands
00029 //#define IMU_CTRL    'q'     //Toggle the IMU to keep the robot driving straight
00030 #define MOTOR_R     'd'     //Command to run right motor
00031 #define MOTOR_L     'a'     //Command to run left motor
00032 #define MOTOR       'w'     //Command to run both motors - specify both speeds
00033 
00034 //#define MOTOR_FWD   'W'     //Command to run both motors straight forward
00035 //#define ROTATE      'A'     //Command to rotate by specified rotation [degrees]
00036 
00037 #define MOTOR_STOP  's'     //Command to stop both motors
00038 #define GO_TO       'G'     //Command robot to go to specified coordinate
00039 
00040 #endif