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:
- 48:daa2a1900ada
- Parent:
- 47:6a58dcef714f
- Child:
- 50:1cfe1f975b0c
--- a/main.cpp Thu Apr 27 07:40:02 2017 +0000 +++ b/main.cpp Thu Apr 27 10:24:51 2017 +0000 @@ -80,7 +80,7 @@ accc = checkAcc(); } - if(accc < 0.25f) { + if(accc < accTheshold) { handleStartStop(); } else { //sendString("up %f", accc); @@ -501,7 +501,7 @@ } float checkAcc() { - return abs(acc.getAccY()); + return abs(acc.getAccZ()); }