car using PID from centre line
Dependencies: FRDM-TFC mbed CBuffer XBEE mbed_angular_speed motor2 MMA8451Q
Fork of KL25Z_Camera_Test by
Diff: main.h
- Revision:
- 40:10e8e80af7da
- Parent:
- 39:7b28ee39185d
- Child:
- 41:d74878640739
--- a/main.h Fri Jan 13 10:21:07 2017 +0000 +++ b/main.h Sat Jan 21 11:59:20 2017 +0000 @@ -8,6 +8,19 @@ #define CLOSE_CAMERA TFC_LineScanImage0 #define LOOKAHEAD_CAMERA TFC_LineScanImage1 +#define CHANGE_PID 'A' +#define SEND_SPEEDS 'B' +#define STOP 'C' +#define START 'D' +#define STATUS_STRING 'E' +#define MAX_SPEED 'F' +#define TURNING_RATIO 'G' +#define SEND_LINE 'H' +#define RECIEVE_THRESHOLD_LINE 'I' +#define BATTERY_LEVEL 'J' +#define SWITCH_CAM 'K' +#define CHANGE_ED 'L' + #define ALIGN_SERVO TFC_InitServos(0.00052,0.00122,0.02) @@ -35,6 +48,7 @@ extern inline void sendSpeeds(); extern void sendBattery(); +extern void buttonStartup(); extern void initVariables(); extern void initPID(pid_instance* pid, float Kp, float Ki, float Kd); extern inline float findCentreValue(volatile uint16_t * cam_data, uint8_t &left, uint8_t &right);