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:
- 30:6c047af9f0cc
- Parent:
- 29:b5b31256572b
--- a/main.cpp Tue Jan 10 11:24:13 2017 +0000 +++ b/main.cpp Wed Jan 11 11:18:03 2017 +0000 @@ -74,7 +74,7 @@ TFC_LineScanImageReady=0; // Slow down, adjust PID values and enable differential before corners. - //handleCornering(); + handleCornering(); // Run the PID controllers and adjust steering/motor accordingly PIDController(); @@ -202,7 +202,7 @@ } */ - if(false) { + if(true) { //default //TFC_SetMotorPWM(0.4,0.4); @@ -401,7 +401,7 @@ sendString("Start/stop seen"); TFC_SetMotorPWM(0.f,0.f); TFC_HBRIDGE_DISABLE; - lapTime(); + //lapTime(); } // slower++; @@ -626,7 +626,7 @@ sendString("For lap number: %d Lap Time: %f Avergae time: %f \n\r", lapNo,lapTime,avgTime); - // OH WHAT UP IT'S DAT BOI!!!! + return 0; }