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 by
Revision 19:9e87d4f9fbc4, committed 2016-11-04
- Comitter:
- daniQQue
- Date:
- Fri Nov 04 07:37:06 2016 +0000
- Parent:
- 18:75ced8c04eee
- Commit message:
- rampscenario
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 18 12:07:00 2016 +0000
+++ b/main.cpp Fri Nov 04 07:37:06 2016 +0000
@@ -4,8 +4,8 @@
InterruptIn sw3(SW3);
DigitalIn encoder1A(D13);
DigitalIn encoder1B(D12);
-DigitalIn button_cw(D9);
-DigitalIn button_ccw(D8);
+DigitalIn button_cw(PTC12);
+DigitalIn button_ccw(D9);
//DigitalOut ledcw(D10);
//DigitalOut ledccw(D2);
MODSERIAL pc(USBTX, USBRX);
@@ -40,7 +40,7 @@
pc.printf("up \n\r"); // print lijn "up"
richting_motor1 = 1;
pwm_motor1 = a;
- \\ ledcw=1; ledccw=0;
+ // ledcw=1; ledccw=0;
}
@@ -50,8 +50,8 @@
pc.printf("left \n\r"); // print lijn "left"
richting_motor2 = 1;
pwm_motor2 = b;
- \\ledcw=1;
- \\ledccw=1;
+ //ledcw=1;
+ //ledccw=1;
}
}
@@ -63,7 +63,7 @@
pc.printf("down \n\r"); // print lijn "down"
richting_motor1 = 0;
pwm_motor1 = a;
- \\ledccw=1; ledcw=0;
+ //ledccw=1; ledcw=0;
}
@@ -73,7 +73,7 @@
pc.printf("right \n\r"); // print lijn "right"
richting_motor2 = 0;
pwm_motor2 = b;
- \\ledccw=1; ledcw=0;
+ //ledccw=1; ledcw=0;
}
}
@@ -81,10 +81,9 @@
pc.printf("motor staat stil \n\r");
pwm_motor2=0;
pwm_motor1=0;
- \\ledccw=0; ;ledcw=0;
+ //ledccw=0; ;ledcw=0;
}
-
-
+
}
}
\ No newline at end of file
