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
Diff: Project_main.cpp
- Revision:
- 34:e166187e62ce
- Parent:
- 33:a78ec776dfd5
- Child:
- 35:c3182df00ec8
diff -r a78ec776dfd5 -r e166187e62ce Project_main.cpp
--- a/Project_main.cpp Tue Oct 07 11:54:53 2014 +0000
+++ b/Project_main.cpp Tue Oct 07 12:34:32 2014 +0000
@@ -40,6 +40,9 @@
if(pc.rxBufferGetSize(0)-pc.rxBufferGetCount() > 30) { //VRAAG: praktisch nut hiervan? print emg value wanneer buffercount groter dan 30 is
//pc.printf("%u\n",emg_bivalue);
}
+
+ /* EMG-singaal van biceps en triceps worden hier gefilterd*/
+
scope.set(0,emg_bivalue);
scope.set(1,emg_bifloat.read());
scope.set(2,emg_trivalue);
@@ -47,6 +50,7 @@
scope.send();
}
+/*
void resetlooper() // VRAAG: wat gebeurt er wanneer en resetlooper en looper tegelijkertijd gecalled worden?!
{
if(emg_trifloat.read()>0.8 && direction != 0) { //dit is alleen mogelijk wanneer directionchoice is gemaakt
@@ -55,6 +59,7 @@
pc.printf("reset ");
}
}
+CONSTANTE RESETS DOOR BEWEGINGSARTEFACTEN*/
int main()
{
@@ -62,9 +67,7 @@
emg_bifloat.period_ms(2); //sets period for the PWM to the emgfloat PTD4
emg_trifloat.period_ms(2);
log_timer.attach(looper, 0.001); // The looper() function will be called every 0.001 seconds (with the ticker object)
- reset_timer.attach(resetlooper, 0.1); //
-
- /* EMG-singaal van biceps en triceps worden hier gefilterd*/
+// reset_timer.attach(resetlooper, 0.1); //
goto directionchoice; // goes to first while(1) for the deciding the direction