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: mbed HIDScope biquadFilter
Diff: main.cpp
- Revision:
- 5:df782fe787f0
- Parent:
- 4:ebb36bf9feb8
diff -r ebb36bf9feb8 -r df782fe787f0 main.cpp
--- a/main.cpp Fri Oct 21 15:01:44 2016 +0000
+++ b/main.cpp Mon Oct 24 11:06:25 2016 +0000
@@ -1,20 +1,15 @@
#include "mbed.h"
#include "BiQuad.h"
#include "HIDScope.h"
-#include <math.h>
-
-//#define SERIAL_BAUD 115200
AnalogIn emg0( A0 );
AnalogIn emg1( A1 );
-//Serial pc(USBTX,USBRX);
-Ticker sample_timer, average_timer, filter_timer, t;
-HIDScope scope( 6 );
+Ticker filter_timer;
+HIDScope scope( 4 );
DigitalOut led1(LED_RED);
DigitalOut led2(LED_BLUE);
-volatile int time_passed = 0;
volatile bool filter_timer_go=false;
double EMGright, EMGleft, inR;
@@ -33,11 +28,6 @@
BiQuad bq3(5.6248e-05,1.1250e-04,5.6248e-05,-1.9787e+00,9.7890e-01);
-void KeepTrackOfTime()
-{
- time_passed++;
-}
-
// In the following: R is used for right arm, L is used for left arm!
void FilteredSample()
{
@@ -68,11 +58,9 @@
int main()
{
- //pc.baud(115200);
led1=1;
led2=1;
led2=!led2;
- //t.attach(&KeepTrackOfTime,1.0); //taking the time in seconds
bcq1.add(&bq1).add(&bq2);
bcq2.add(&bq3);