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 biquadFilter MODSERIAL FastPWM
Diff: main.cpp
- Revision:
- 11:f83e3bf7febf
- Parent:
- 10:b8c60fd468f1
- Child:
- 12:88cbc65f2563
--- a/main.cpp Sun Oct 06 13:14:40 2019 +0000
+++ b/main.cpp Mon Oct 07 08:38:07 2019 +0000
@@ -99,14 +99,7 @@
*/
-
- pot_1 = Pot1.read();
- pc.printf("pot_1 = %f",pot_1); // Dit doet hij niet, waarom niet? Er scheelt niet veel aan, maar toch
- motor.speed1 = pot_1*0.75; //pod_read * 0.75 (dus max 75%)
-
- pot_2 = Pot2.read();
- pc.printf("pot_2 = %f",pot_2); // Dit doet hij niet, waarom niet? Er scheelt niet veel aan, maar toch
- motor.speed2 = pot_2*0.75; //pod_read * 0.75 (dus max 75%)
+
return;
}
@@ -229,8 +222,8 @@
motor.dir1 = 0;
motor.dir2 = 0;
- motor2_pwm.period(0.0000625f); // 1/frequency van waarop hij draait
- motor1_pwm.period(0.0000625f); // 1/frequency van waarop hij draait
+ motor2_pwm.period(1/160000f); // 1/frequency van waarop hij draait
+ motor1_pwm.period(1/160000f); // 1/frequency van waarop hij draait
but1.fall(&but1_interrupt);
but2.fall(&but2_interrupt);