EMG filtering; highpass, notch, abs, moving average
Dependencies: HIDScope MODSERIAL- mbed-dsp mbed
Revision 31:d8eaf0ce8517, committed 2014-10-06
- Comitter:
- Hooglugt
- Date:
- Mon Oct 06 13:27:01 2014 +0000
- Parent:
- 30:5e5098b0cca6
- Child:
- 32:aaf01b1bf05d
- Commit message:
- fout in vorige commit, oplossing in comments bijgeschreven
Changed in this revision
Project_main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Project_main.cpp Mon Oct 06 13:21:55 2014 +0000 +++ b/Project_main.cpp Mon Oct 06 13:27:01 2014 +0000 @@ -36,7 +36,7 @@ uint16_t emg_trivalue; emg_trivalue = emg1.read_u16(); // read direct ADC result (0..4096 = 0..3.3V) biceps - /*send value to PC. Line below is used to prevent buffer overrun */ + /*send value to PC. Line below is used to prevent buffer overrun */ 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); } @@ -47,14 +47,16 @@ scope.send(); } -void resetlooper(){ +void resetlooper() +{ if(emg_trifloat.read()>0.8 && direction != 0) { //dit is alleen mogelijk wanneer directionchoice is gemaakt direction = 0; force = 0; // WEGHALEN, wanneer in uiteindelijke script na force keuzen niet meer gereset kan worden (voor nu wel handig) - goto directionchoice; - } + pc.printf("reset "); + goto directionchoice; //<--- dit kan NATUURLIJK NIET, dus iets wat vervolgens checked of directionchoice en/of force is bepaald in de mainloop en dan een goto maken + } } - + int main() { pc.baud(115200); //baudrate instellen