
estabilizador
Dependencies: MMA8451Q PID TSI mbed
Fork of CAR by
Revision 1:f22840ee371d, committed 2018-06-29
- Comitter:
- JairZambrano97
- Date:
- Fri Jun 29 17:15:42 2018 +0000
- Parent:
- 0:178159bf8a9c
- Commit message:
- estabilizador
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Jun 28 22:20:25 2018 +0000 +++ b/main.cpp Fri Jun 29 17:15:42 2018 +0000 @@ -41,14 +41,14 @@ int main() { //Analog input from 0.0 to 3.3V - controller.setInputLimits(-0.40, 0.40); + controller.setInputLimits(0.0, 0.40); //Pwm output from 0.0 to 1.0 - controller.setOutputLimits(0.0, 1.0); + controller.setOutputLimits(0.0, 4.5); //If there's a bias. controller.setBias(0.3); controller.setMode(1); //We want the process variable to be 1.7V - controller.setSetPoint(0.00); + controller.setSetPoint(0.20); // directWheelL = fordward; // directWheelR = fordward; @@ -61,7 +61,7 @@ while (true) { float x, y, z; x = abs(acc.getAccX()); - y = acc.getAccY(); + y = abs(acc.getAccY()); z = abs(acc.getAccZ()); //pwmWheelL = 1.0 - tsi.readPercentage();