Self-Balancing bot for MAX32630 and two wheel car.
Dependencies: mbed BMI160 SDFileSystem max32630fthr
Diff: main.cpp
- Revision:
- 2:5af1d818331f
- Parent:
- 1:e9dd53326ba1
- Child:
- 3:7807a40b2459
--- a/main.cpp Fri Jan 06 20:27:17 2017 +0000 +++ b/main.cpp Fri Jan 06 20:32:13 2017 +0000 @@ -362,8 +362,6 @@ //Just balance for now, so both left/right are the same pulseWidth = ((KP * currentError) + (KI * integral) + (KD * derivative)); - //printf("Pulsewidth = %f\n\n", pulseWidth); - //Clamp to maximum duty cycle and check for forward/reverse //based on sign of error signal (negation of pitch since setPoint = 0) if(pulseWidth > MAX_PULSEWIDTH_US)