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: FastPWM HIDScope MODSERIAL QEI biquadFilter mbed
Fork of PES_tutorial_5 by
Diff: main.cpp
- Revision:
- 7:3b503177ff5c
- Parent:
- 6:bd73804c8cec
- Child:
- 8:ceb9abb5a4a8
diff -r bd73804c8cec -r 3b503177ff5c main.cpp
--- a/main.cpp Mon Oct 15 10:20:24 2018 +0000
+++ b/main.cpp Mon Oct 15 10:37:27 2018 +0000
@@ -15,7 +15,6 @@
// Aflezen Potentiometers voor PWM
motor1_pwm = pot1.read(); // Aflezen PotMeter 1 (volatile omdat je altijd de potmeter wil blijven lezen)
pc.printf("%i\r\n", Encoder.getPulses());
-
}
void buttonpress()
@@ -26,26 +25,6 @@
pc.printf("Velocity is %f \r\n", motor1_velocity);
}
-/*double GetReferenceVelocity()
-{
- // Returns reference velocity in rad/s.
- // Positive value means clockwise rotation.
- // 60 rpm = 60*2*pi/60 = 6.28 ~ 6.2 rad/s
- const float maxVelocity = 6.2; // in rad/s of course!
- double referenceVelocity; // in rad/s
- if (button2) {
- // Clockwise rotation
- referenceVelocity = potMeterIn * maxVelocity;
- }
- else
- {
- // Counterclockwise rotation
- referenceVelocity = -1*potMeterIn * maxVelocity;
- }
- return referenceVelocity;
-} */
-
-
int main()
{
pc.baud(115200);
