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
Fork of TotalCodegr13V2 by
Revision 20:3424ef411538, committed 2015-11-02
- Comitter:
- arunr
- Date:
- Mon Nov 02 15:45:52 2015 +0000
- Parent:
- 19:aa7e88a631ad
- Commit message:
- Toverstaf
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Nov 02 15:44:43 2015 +0000
+++ b/main.cpp Mon Nov 02 15:45:52 2015 +0000
@@ -188,17 +188,17 @@
} else if (button_1 == pressed || (final_filter4 > 0.03 && final_filter1 < 0.02 && final_filter2 < 0.02 && final_filter3 < 0.02)) {
pc.printf("motor2 ccw \n\r");
motor2_direction = 1; //counterclockwise
- motor2_speed = 0.1; // snelheid op 1 zetten voor gebruik, lager voor testen
+ motor2_speed = 0.1; // snelheid op 1 zetten voor gebruik, lager voor testen
} else {
pc.printf("Not moving2 \n\r");
motor2_speed = 0;
}
-
+
}
void movetohome1()
{
- double P1 = motor1.getPosition();
+ double P1 = motor1.getPosition();
if ((P1 > -13 && P1 < 13)) {
motor1_speed = 0;
@@ -208,14 +208,14 @@
} else if (P1 < -12) {
motor1_direction = 0;
motor1_speed = 0.1;
- }
+ }
}
void movetohome2()
{
- double P2 = motor2.getPosition();
-
- if (P2 > -13 && P2 < 13){
+ double P2 = motor2.getPosition();
+
+ if (P2 > -13 && P2 < 13) {
motor2_speed = 0;
} else if (P2 > 12) {
motor2_direction = 0;
@@ -246,7 +246,7 @@
switch (state) { //zorgt voor het in goede volgorde uitvoeren van de cases
-
+
case MOVE_MOTORS: { //Bewegen motor met EMG, knoppen indrukken om terug te gaan
pc.printf("move_motor\n\r");
