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: HIDScope MODSERIAL mbed-dsp mbed
Fork of emg_filter by
Revision 52:cce270e0753a, committed 2014-10-20
- Comitter:
- Tanja2211
- Date:
- Mon Oct 20 08:55:45 2014 +0000
- Parent:
- 51:809e38348c91
- Child:
- 53:d90e54fba7d8
- Commit message:
- foutjes wegwerken
Changed in this revision
| EMGfilter.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/EMGfilter.cpp Mon Oct 20 08:43:59 2014 +0000
+++ b/EMGfilter.cpp Mon Oct 20 08:55:45 2014 +0000
@@ -49,6 +49,7 @@
float filtered_emgT;
float B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, MOVAVG_B;
float T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, MOVAVG_T;
+float drempelwaardeB1, drempelwaardeB2, drempelwaardeB3, drempelwaardeT;
MODSERIAL pc(USBTX,USBRX);
@@ -186,9 +187,9 @@
//filtered_emgB
//filtered_emgT
-void Antwoord()
+void AntwoordT()
{
- float drempelwaardeT=4.99;
+ drempelwaardeT=4.99;
int y;
if (MOVAVG_T > drempelwaardeT) {
@@ -202,20 +203,21 @@
} else {
pc.printf("Motor 2 beweegt niet\n");
}
+ }
- void Antwoord() {
- float drempelwaardeB1=4.99;
- float drempelwaardeB2=6;
- float drempelwaardeB3=10;
+ void AntwoordB() {
+ drempelwaardeB1=4.99;
+ drempelwaardeB2=6;
+ drempelwaardeB3=10;
int yB1;
int yB2;
int yB3;
- if (MOVAVG_B > drempelwaarde1) {
+ if (MOVAVG_B > drempelwaardeB1) {
yB1=1;
- if MOVAVG_B > drempelwaarde2 {
+ if (MOVAVG_B > drempelwaardeB2) {
yB2=1;
- if MOVAVG_B > drempeldwaarde3{
+ if (MOVAVG_B > drempeldwaardeB3) {
yB3=1;
} else {
yB3=0
@@ -226,6 +228,7 @@
else {
yB1=0;
}
+ }
int snelheidsstand;
int yB1, yB2, yB3;
snelheidsstand=yB1+yB2+yB3;
