![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
emg
Dependencies: HIDScope MODSERIAL mbed-dsp mbed TouchButton
Fork of test by
Diff: main.cpp
- Revision:
- 26:e43cae7186f5
- Parent:
- 25:093794ba9237
- Child:
- 27:9adedca4644e
--- a/main.cpp Mon Oct 27 12:16:12 2014 +0000 +++ b/main.cpp Mon Oct 27 12:23:00 2014 +0000 @@ -210,38 +210,38 @@ wait(5); log_timerT1.detach(); - //MOVAVG_T=MOVAVG_Positie1; + MOVAVG_T=MOVAVG_Positie1; // positie van batje met behulp van Triceps drempelwaardeT=0.001; - if (MOVAVG_T >= drempelwaardeT) { + if (MOVAVG_Positie1>= drempelwaardeT) { yT1=1; - - //bepaling van positie met tricep 2 - //Ticker log_timerT2; - - //arm_biquad_cascade_df1_init_f32(¬chT,1,notch_const,notch_states); - //arm_biquad_cascade_df1_init_f32(&lowpassT,1,lowpass_const,lowpass_states); - //arm_biquad_cascade_df1_init_f32(&highpassT,1,highpass_const,highpass_states); - - //log_timerT2.attach(Triceps, 0.005); - //wait(5); - //log_timerT2.detach(); - - //MOVAVG_T=MOVAVG_Positie2; - - //if (MOVAVG_T >= drempelwaardeT) { - // yT2=1; - //} else { - // yT2=0; - //} } else { yT1=0; } + //bepaling van positie met tricep 2 + Ticker log_timerT2; + + arm_biquad_cascade_df1_init_f32(¬chT,1,notch_const,notch_states); + arm_biquad_cascade_df1_init_f32(&lowpassT,1,lowpass_const,lowpass_states); + arm_biquad_cascade_df1_init_f32(&highpassT,1,highpass_const,highpass_states); + + log_timerT2.attach(Triceps, 0.005); + wait(5); + log_timerT2.detach(); + + MOVAVG_T=MOVAVG_Positie2; + + if (MOVAVG_Positie2 >= drempelwaardeT) { + yT2=1; + } else { + yT2=0; + } + //*** INPUT MOTOR 2 *** - positie=yT1; //+yT2; + positie=yT1+yT2; //controle positie op scherm if (positie==0) {