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: MODSERIAL QEI mbed
Fork of check_motoren_buttons_emg by
Revision 14:091953e55c1d, committed 2016-09-30
- Comitter:
- daniQQue
- Date:
- Fri Sep 30 13:19:59 2016 +0000
- Parent:
- 13:ba5713727343
- Child:
- 15:cba0cf26475e
- Commit message:
- snelheden met letters zonder encoder;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 30 13:12:18 2016 +0000
+++ b/main.cpp Fri Sep 30 13:19:59 2016 +0000
@@ -23,7 +23,9 @@
int main()
{
pc.baud(115200); // zorgt voor de link voor putty, 115200 is snelheid
-
+ const float a=1.0;
+ const float b=10;
+
while (true) { // zorgt er voor dat de code oneindig doorgelopen wordt
sw3.fall(&SwitchN); // zorgt er voor dat void switch wordt gedaan als switch 3 wordt ingedrukt
@@ -37,7 +39,7 @@
pc.printf("n is even \n\r"); // print lijn "n is even"
pc.printf("up \n\r"); // print lijn "up"
richting_motor1 = 1;
- pwm_motor1 = 1;
+ pwm_motor1 = a;
ledcw=1; ledccw=0;
}
@@ -47,7 +49,7 @@
pc.printf("n is odd \n\r"); // print lijn "n is odd"
pc.printf("left \n\r"); // print lijn "left"
richting_motor2 = 1;
- pwm_motor2 = 5;
+ pwm_motor2 = b;
ledcw=1;
ledccw=1;
}
@@ -60,7 +62,7 @@
pc.printf("n is even \n\r"); // print lijn "n is even"
pc.printf("down \n\r"); // print lijn "down"
richting_motor1 = 0;
- pwm_motor1 = 1;
+ pwm_motor1 = a;
ledccw=1; ledcw=0;
@@ -70,7 +72,7 @@
pc.printf("n is odd \n\r"); // print lijn "n is odd"
pc.printf("right \n\r"); // print lijn "right"
richting_motor2 = 0;
- pwm_motor2 = 5;
+ pwm_motor2 = b;
ledccw=1; ledcw=0;
}
@@ -79,7 +81,7 @@
pc.printf("motor staat stil \n\r");
pwm_motor2=0;
pwm_motor1=0;
- ledccw=0; ;ledcw=0;
+ ledccw=1; ;ledcw=0;
}
