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 mbed MODSERIAL
Diff: main.cpp
- Revision:
- 10:897db0bdb2fe
- Parent:
- 9:1655d67d8a53
- Child:
- 11:17b1d5f5370b
- Child:
- 13:b01231e0b743
--- a/main.cpp Wed Oct 07 13:48:19 2015 +0000
+++ b/main.cpp Wed Oct 07 14:34:55 2015 +0000
@@ -1,7 +1,6 @@
#include "mbed.h"
#include "HIDScope.h"
#include "Filterdesigns.h"
-#include "Meanvalue.h"
AnalogIn emg(A0); //Analog input van emg kabels
HIDScope scope(3); //2 scopes
@@ -11,20 +10,13 @@
double Fs = 500; //Hz
double t = 1/ Fs; // voor EMGticker
-// gemidelde waarde
-double sum = 0;
+double y = 0;
double ymean = 0;
-int a = 0;
-int delay = 40;
-
-double y=0;
-
void EMGfilter(){
//uitlezen emg signaal
double u = emg.read();
- Filterdesign1(u, y);
- double ymean = Meanvalue(y, sum, ymean, a, delay);
+ Filterdesign1(u,y, ymean);
// Plotten in HIDscope
scope.set(0,u); //ongefilterde waarde naar scope 1