Hello everyone, kinda new here with both the forum and electronics.
Currently trying out EMG sensor from uMyo and using ESP32 as the microcontroller. The output I believe is in the form of FFT and not raw EMG value. The device itself has an internal calculation mode of average EMG which is what I am using right now using 2 devices. I am trying at 2 different places to capture signals of folding fingers and well it could capture the 2 fingers as the higher EMG value as shown in the image below. (red: sensor1, blue: sensor2)
My question is how do I capture the high waveform into a signal for example high waveform of channel 1 into integer of 1 while channel 2 into integer 2? I wanted to apply it into remote control, making them to act as buttons. I've searched into the forum for similar cases and some people suggested Nyquist theorem sampling frequency, but what do you think? Are there any specific filter that could work? Would high pass filtering also work?
Code is as below
/*
Obtaining muscle data from uMyo via BLE on various Arduino boards
Usage: install ArduinoBLE library, run the code on BLE enabled Arduino (nRF52 or ESP32 core)
- open Serial Plotter (or Serial Monitor) at 115200 speed
- turn on uMyo device
- switch it into BLE mode if necessary (to switch, press button once or twice, depending on current mode)
- you should see muscle activity chart on a plot (or as serial output)
*/
#include <uMyo_BLE.h>
void setup() {
Serial.begin(115200);
uMyo.begin();
}
void loop()
{
uMyo.run();
int dev_count = uMyo.getDeviceCount(); //if more than one device is present, show all of them
for(int d = 0; d < dev_count; d++)
{
Serial.print(uMyo.getAverageMuscleLevel(d));
if(d < dev_count-1) Serial.print(' ');
else Serial.println();
}
delay(30);
}
