
first commit
Diff: main.cpp
- Revision:
- 23:4c743746533c
- Parent:
- 22:08d30ea47111
- Child:
- 24:7bf492bf50f4
--- a/main.cpp Wed Nov 03 16:13:02 2021 +0000 +++ b/main.cpp Wed Nov 03 21:52:00 2021 +0000 @@ -15,7 +15,6 @@ Ticker motorLoop; Ticker fault_detector; -Timer t; Ticker controlUpdate; void PID (void) { @@ -60,7 +59,7 @@ while(1) { pc.printf("\n\n"); -wait(1); +wait(0.1); /* bt.printf("\n\n"); bt.printf("\n\rMotor enabled ? : %d ", motor_enabled ); @@ -83,9 +82,10 @@ case LOW_VOLTAGE : bt.printf("\r\nFault: LOW VOLTAGE"); break; } bt.printf("\n\n----"); - bt.printf("\n\rleft distance sensor : %1.6f", left_distance_sensor.read()); - bt.printf("\n\rRight distance sensor : %1.6f", right_distance_sensor.read()); - + bt.printf("\n\rLandmark triggered: %d", landmark_triggered); + bt.printf("\n\rLandmark restart: %d", restarted); + bt.printf("\n\rTimer land: %d", land.read()); + bt.printf("\n\r%f", errorArea); //pot1Voltage = pot1 * 3.3f; //dutyCycleLeft = (pot1 * fullBatScalar);