upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Member Functions

API for the Grove EMG Muscle Signal Reader. More...

Detailed Description

Grove EMG muscle signal reader gathers small muscle signals, then processes them, and returns the result

emg.jpg
// The was tested with the EMG Muscle Signal Reader Sensor Module
// Instantiate a EMG on analog pin A0
upm::EMG emg(0);
cout << "Calibrating...." << endl;
emg.calibrate();
while (shouldRun) {
cout << emg.value() << endl;
upm_delay_us(100000);
}

Public Member Functions

 EMG (int pin)
 
 ~EMG ()
 
void calibrate ()
 
int value ()
 

Constructor & Destructor Documentation

EMG ( int  pin)

Grove EMG reader constructor

Parameters
pinAnalog pin to use
~EMG ( )

EMG destructor

Member Function Documentation

void calibrate ( )

Calibrates the Grove EMG reader

int value ( )

Measures muscle signals from the reader

Returns
Muscle output as analog voltage

The documentation for this class was generated from the following files: