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: Encoder HIDScope MODSERIAL TouchButton mbed-dsp mbed
Fork of Robot2mooiemanier by
Revision 15:737f5f448eb7, committed 2014-10-31
- Comitter:
- Jolein
- Date:
- Fri Oct 31 09:40:30 2014 +0000
- Parent:
- 14:1ff917c6ac45
- Child:
- 16:8e56aa6f4b7a
- Commit message:
- volgorde voor duidelijkheid veranderd
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Oct 31 09:21:39 2014 +0000
+++ b/main.cpp Fri Oct 31 09:40:30 2014 +0000
@@ -643,11 +643,11 @@
stop = 1; //zorgt dat hij niet weer gaat slaan tot er gereset is...
}
if (toestand == TERUGKEREN) {
- pc.printf("motor gaat terugkeren\n\r");
new_pwm = pid(setspeed, motor1.getSpeed(),false);
pwm_motor1.write(new_pwm);
+ motordir1 = 0;
+ pc.printf("motor gaat terugkeren\n\r");
pc.printf("new pwm %f\r\n",new_pwm);
- motordir1 = 0;
}
if (toestand == WACHTEN) {
pwm_motor1.write(0);
@@ -655,8 +655,8 @@
}
if (toestand == SLAAN) {
new_pwm = pid(setspeed, motor1.getSpeed(),false);
+ pwm_motor1.write(new_pwm);
motordir1 = 1;
- pwm_motor1.write(new_pwm);
pc.printf("SLAAN\n");
}
