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- mbed-dsp mbed
Fork of PROJECT_FINAL by
Revision 23:913bf8a6f7d8, committed 2014-11-04
- Comitter:
- Hooglugt
- Date:
- Tue Nov 04 10:35:26 2014 +0000
- Parent:
- 22:77d7065cc431
- Child:
- 24:1b812b393264
- Commit message:
- hoek kan bepaald worden
Changed in this revision
| PROJECT_main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PROJECT_main.cpp Tue Nov 04 10:27:56 2014 +0000
+++ b/PROJECT_main.cpp Tue Nov 04 10:35:26 2014 +0000
@@ -551,7 +551,7 @@
pwm_motor2.write(0.8);
motor2dir = 1;
count++;
- if (count>50) {
+ if (count>140) {
state=2;
count = 0;
pwm_motor2.write(0);
@@ -568,25 +568,16 @@
}
break;
case 3:
- angle = 0.08;
+ pwm_motor2.write(0.8);
+ motor2dir = 1;
+ count++;
+ if (count>50) {
+ state=2;
+ count = 0;
+ pwm_motor2.write(0);
+ }
break;
- }
- /*
- setpoint2 = angle;
-
- if(motor2.getPosition()>angle) { // batjeset (controle bereik)
- count = 0;
- state=2;
- }
-
-
- if(setpoint2>angle) { // batjeset (controle bereik)
- setpoint2 = angle; //setpoint2 = motor2.getPosition()*omrekenfactor2;
- count = 0;
- state=2;
- } */
- break;
- }
+ }
case 2: {
count++;
if(count>1000) {
