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:
- 13:4e77264f254a
- Parent:
- 12:da96e2f87465
- Child:
- 17:6ae90788cc2b
--- a/main.h Mon Nov 21 17:19:05 2016 +0000 +++ b/main.h Tue Nov 29 13:11:20 2016 +0000 @@ -7,7 +7,13 @@ float p_error; float pid_error; float integral; - float measured_value, desired_value, derivative; + + //Measured value is a float between -1.0 and 1.0 (from left to right) + float measured_value; + + //Desired value is always 0.0 (as in, car is in the middle of the road) + float desired_value; + float derivative; float output; } pid_instance;