
first commit
Diff: main.cpp
- Revision:
- 17:d2c98ebda90b
- Parent:
- 14:eb9c58c0f8cd
- Child:
- 18:831c1e03d83e
--- a/main.cpp Tue Oct 26 17:06:39 2021 +0000 +++ b/main.cpp Tue Oct 26 19:10:13 2021 +0000 @@ -55,21 +55,22 @@ pc.printf("Hello World!\n"); bt.printf("Hello World!\n"); -t.start(); -float time = t.read(); +//t.start(); +//float time = t.read(); //prints the string to the Tera-Term Console using the Bluetooth object ‘bt’. while(1) { pc.printf("\n\n"); - + /* bt.printf("\n\n"); bt.printf("\n\rMotor enabled ? : %d ", motor_enabled ); bt.printf("\n\rSteering enabled ? : %d ", steering_enabled ); bt.printf("\n\rCurrent duty cycle : %f", current_duty_cycle); bt.printf("\n\Brake enabled ? : %d ", are_brakes_activated ); bt.printf("\n\rCurrent duty cycle? : %f ", current_duty_cycle ); + */ //wait(0.5); //commented out the wait bc it slows down the fault_check, and it breaks the analogIn readings for the driving input //the driving input ticker is faster than the analog.read() function, so all analog.read() methods must be in the main loop switch(current_state ){ @@ -92,9 +93,6 @@ //speedLeft = (speedSensorLeft * speedSensorScalar); //speedRight = (speedSensorRight * speedSensorScalar); -speedLeftVolt = (speedSensorLeft * 3.3f); -speedRightVolt = (speedSensorRight * 3.3f); -/* bt.printf("Duty Cycle = %1.2f ", dutyCycleLeft); bt.printf("Speed (V) L,R = %1.2f", speedLeftVolt); bt.printf(", %1.2f ", speedRightVolt); @@ -106,7 +104,7 @@ bt.printf("Output: %1.2f ", controllerOutputLeft); bt.printf("Batt Voltage: %1.2f \n",avgCellVoltage); -*/ + //setpointLeft = pot1; //setpointRight = pot1;