Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of FYDP_Final2 by
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
Generated on Tue Jul 12 2022 16:56:36 by
