Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed QEI HIDScope BiQuad4th_order biquadFilter MODSERIAL FastPWM
Diff: main.cpp
- Revision:
- 4:55e6707949dd
- Parent:
- 3:06f794380b5d
- Child:
- 5:5082d694e643
diff -r 06f794380b5d -r 55e6707949dd main.cpp
--- a/main.cpp Fri Oct 25 10:34:09 2019 +0000
+++ b/main.cpp Fri Oct 25 10:35:11 2019 +0000
@@ -49,7 +49,7 @@
//PwmOut *E = pointer to speed contorl pin of motor
//QEI *Enc = pointer to encoder of motor
//float rotDes = desired rotation
-/*void moveMotorTo(DigitalOut *M, PwmOut *E, QEI *Enc, float initRot, float rotDes)
+void moveMotorTo(DigitalOut *M, PwmOut *E, QEI *Enc, float initRot, float rotDes)
{
float pErrorC;
float pErrorP = 0;
@@ -91,7 +91,7 @@
pc.printf("pError: %f iError: %f dError: %f\n\r", pErrorC, iError, dError);
} while (pErrorC > 0.001 || pErrorC < -0.001 ||dError > 0.01 || dError < -0.01);
t.stop();
-}*/
+}
//double that calculates the rotation of one arm.
@@ -145,10 +145,10 @@
pc.printf("to go angle: %i / %i \n\r", i, xPath.size());
}
- /*for(int i = 0; i < xPath.size(); i++) {
+ for(int i = 0; i < xPath.size(); i++) {
moveMotorTo(&M1, &E1, &Enc1, initRot1, rot1Path.at(i));
moveMotorTo(&M2, &E2, &Enc2, initRot2, rot2Path.at(i));
pc.printf("to go move: %i / %i", i, rot1Path.size());
- }*/
+ }
}