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 QEI TextLCD mbed
Fork of TotalControlEmg2 by
Revision 29:9610df479f89, committed 2015-10-17
- Comitter:
- RemcoDas
- Date:
- Sat Oct 17 14:13:57 2015 +0000
- Parent:
- 28:e6d2fe0e593e
- Child:
- 30:8ae855348d22
- Commit message:
- EMG haalt links en rechts door elkaar, komt wrs door filterdisigns.cpp en filter.cpp
Changed in this revision
| Filterdesigns.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Filterdesigns.cpp Fri Oct 16 13:08:38 2015 +0000
+++ b/Filterdesigns.cpp Sat Oct 17 14:13:57 2015 +0000
@@ -2,8 +2,6 @@
#include "Filter.h"
// Inputwaardes
-
-
//Notch 50Hz
// Filter1a: 50Hz Notch
@@ -38,8 +36,7 @@
double y=0;
-double Filterdesigns(double u)
-{
+double Filterdesigns(double u){
//u = input waarde
//y = output waarde
--- a/main.cpp Fri Oct 16 13:08:38 2015 +0000
+++ b/main.cpp Sat Oct 17 14:13:57 2015 +0000
@@ -6,7 +6,6 @@
#include "Filterdesigns.h"
#include "Kalibratie.h"
#include "Mode.h"
-#include <math.h>
//--------------------Classes------------------------
InterruptIn btnSet(PTC6); // kalibreer knop
DigitalOut ledR(LED_RED), LedB(LED3); // Led op moederbord
@@ -85,8 +84,7 @@
if((ymax-ymin) < 0.05){ // voor als er geen kabels in de EMG zitten
ymin = 10;
ymax = 10;
- }
- // bepalen van thresholds voor aan/uit
+ }
thresholdlowR = 8 * ymin; // standaardwaarde
thresholdmidR = 0.5 * ymax; // afhankelijk van max output gebruiker
thresholdhighR = 0.8 * ymax;
@@ -231,8 +229,7 @@
if(regelaarFlag){ // motor regelen op GoFlag
regelaarFlag = false;
checkAim(); // Controleer positie
- }
-
+ }
if(emgFlag){ // Go flag EMG sampelen
emgFlag = false;
if(controlAim()){ // Buttons met control, if true = beide knoppen = bevestigen
