oldexamplecode

Dependencies:   mbed

PSDdetection.h

Committer:
rik
Date:
2017-03-24
Revision:
0:6863633bf8a4

File content as of revision 0:6863633bf8a4:


#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