oldexamplecode
Dependencies: mbed
Diff: PSDdetection.h
- Revision:
- 0:6863633bf8a4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PSDdetection.h Fri Mar 24 11:22:30 2017 +0000 @@ -0,0 +1,29 @@ + +#ifndef PSD_DETECTION_H_ +#define PSD_DETECTION_H_ +#pragma once + +class Arm{ + +public: + Arm(); + ~Arm(); + + // Sets a new reference level + void setReference(int reflevel); + // Updates the array with a new sample and checks wheter a muscle is active + bool checksample(int emgsample); + // Filters the signal with a biquad filter + int biquad10 (int emgsample); + + +private: + int EMGreference; + const int EMGtriggerlevel = 20; // above the reference + int prevEMG[4]; + +}; + + + +#endif \ No newline at end of file