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 EMG_check by
Revision 26:a6b8bad5b0e2, committed 2016-10-28
- Comitter:
- sivuu
- Date:
- Fri Oct 28 12:14:20 2016 +0000
- Parent:
- 25:31179ebc3582
- Child:
- 27:be2be9600e2d
- Child:
- 29:5de90b30c68d
- Commit message:
- hele script met werkende restricties
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Oct 28 11:22:42 2016 +0000
+++ b/main.cpp Fri Oct 28 12:14:20 2016 +0000
@@ -245,7 +245,19 @@
pwm_motor2=0;
pwm_motor1=0;
}
-
+ if (rev_counts_motor1 <-3.4 && richting_motor1 == 0){
+ pwm_motor1=0;
+ }
+ else if(rev_counts_motor1 >3.4 && richting_motor1 == 1){
+ pwm_motor1 =0;
+ }
+
+ if (rev_counts_motor2 < -4.0 && richting_motor2 == 1){
+ pwm_motor2=0;
+ }
+ else if (rev_counts_motor2 > 4.0 && richting_motor2 == 0){
+ pwm_motor2==0;
+ }
}
}
