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 MODSERIAL mbed
Dependents: K9motoraansturing_copy lichtpoortjes
Revision 2:3d39bce54dfe, committed 2013-10-09
- Comitter:
- vsluiter
- Date:
- Wed Oct 09 09:41:56 2013 +0000
- Parent:
- 1:9d05c0236c7e
- Child:
- 3:c9c1c0ebf89d
- Commit message:
- Einde van college
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Oct 09 06:49:17 2013 +0000
+++ b/main.cpp Wed Oct 09 09:41:56 2013 +0000
@@ -36,9 +36,9 @@
pwm_to_motor = (setpoint - motor1.getPosition())*.001;
keep_in_range(&pwm_to_motor, -1,1);
if(pwm_to_motor > 0)
- motordir = 0;
+ motordir = 1;
else
- motordir = 1;
+ motordir = 0;
//WRITE VALUE TO MOTOR
pwm_motor.write(abs(pwm_to_motor));
}