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.cpp
- Revision:
- 37:3baddde964db
- Parent:
- 36:7f482c048387
- Child:
- 39:7b28ee39185d
diff -r 7f482c048387 -r 3baddde964db main.cpp --- a/main.cpp Fri Jan 13 09:50:06 2017 +0000 +++ b/main.cpp Fri Jan 13 10:11:51 2017 +0000 @@ -226,7 +226,7 @@ //dutyCycleCorner(speed, servo_pid.output); // This activates the electronic differential so that it runs whilst cornering. // this changes the desired desired speed of each of the wheels according to the angle of the servo. - sensorCorner(left_motor_pid.desired_value, right_motor_pid.desired_value , servo_pid.output, speed); + sensorCorner(left_motor_pid.desired_value, right_motor_pid.desired_value , servo_pid.output, speed,1); } /* @@ -307,8 +307,7 @@ t.start(); handlePID(&servo_pid); //enables the ED - sensorCorner(left_motor_pid.desired_value,right_motor_pid.desired_value - , servo_pid.output,speed); + sensorCorner(left_motor_pid.desired_value,right_motor_pid.desired_value, servo_pid.output,speed,1); handlePID(&left_motor_pid); handlePID(&right_motor_pid);