car using PID from centre line

Dependencies:   FRDM-TFC mbed CBuffer XBEE mbed_angular_speed motor2 MMA8451Q

Fork of KL25Z_Camera_Test by GDP 4

Committer:
FatCookies
Date:
Tue Nov 29 13:11:20 2016 +0000
Revision:
13:4e77264f254a
Parent:
12:da96e2f87465
Child:
17:6ae90788cc2b
add corner detection

Who changed what in which revision?

UserRevisionLine numberNew contents of line
FatCookies 12:da96e2f87465 1
FatCookies 12:da96e2f87465 2 typedef struct {
FatCookies 12:da96e2f87465 3 float Kp;
FatCookies 12:da96e2f87465 4 float Ki;
FatCookies 12:da96e2f87465 5 float Kd;
FatCookies 12:da96e2f87465 6 float dt;
FatCookies 12:da96e2f87465 7 float p_error;
FatCookies 12:da96e2f87465 8 float pid_error;
FatCookies 12:da96e2f87465 9 float integral;
FatCookies 13:4e77264f254a 10
FatCookies 13:4e77264f254a 11 //Measured value is a float between -1.0 and 1.0 (from left to right)
FatCookies 13:4e77264f254a 12 float measured_value;
FatCookies 13:4e77264f254a 13
FatCookies 13:4e77264f254a 14 //Desired value is always 0.0 (as in, car is in the middle of the road)
FatCookies 13:4e77264f254a 15 float desired_value;
FatCookies 13:4e77264f254a 16 float derivative;
FatCookies 12:da96e2f87465 17 float output;
FatCookies 12:da96e2f87465 18 } pid_instance;
FatCookies 12:da96e2f87465 19