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 Lampje_EMG_Gr6 by
Revision 4:40aa1fb60a24, committed 2014-10-16
- Comitter:
- jessekaiser
- Date:
- Thu Oct 16 13:29:48 2014 +0000
- Parent:
- 3:0895fa0a6ca4
- Child:
- 5:03105d8bf72c
- Commit message:
- Testen 2 EMG signalen. poging 2
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Oct 16 13:25:38 2014 +0000
+++ b/main.cpp Thu Oct 16 13:29:48 2014 +0000
@@ -150,37 +150,19 @@
while(filtered_biceps < 0.04);
while(filtered_biceps > 0.04) { //Wanneer het EMG signaal een piek geeft wordt het volgende uitgevoerd.
- BlinkRed(2);
- if (pc.readable()) { //Wanneer er binnen de vastgestelde tijd weer op 1 wordt gedrukt, gaat het lampje blauw knipperen, anders reset.
- c = pc.getc();
- c = '0';
- myled1 = 1;
- myled2 = 1;
- myled3 = 1;
- wait(1);
- myled1 = 1;
- myled2 = 1;
- myled3 = 0;
- wait(1);
- myled1 = 1;
- myled2 = 1;
- myled3 = 1;
- wait(1);
- myled1 = 1;
- myled2 = 1;
- myled3 = 0;
- wait(1);
- } else if (c != '1') {
+ BlinkRed(20);
+ if (filtered_deltoid > 0.04){
+ BlinkBlue(20)
+ } else if (filtered_biceps < 0.04 && filtered_deltoid < 0.04) {
break;
}
- if(pc.readable()) {
- c = pc.getc();
+ if(filtered_biceps > 0.04){
myled1 = 1;
myled2 = 0;
myled3 = 1;
wait(5); //Dit wordt de duur van het slaan en teruggaan naar de beginpositie totdat er opnieuw gemeten kan worden.
- c = '0';
+
}
}
}
