Hey everyone. Currently using the EMG Myoware sensor connected to ESP32 with the ENV output but I noticed that the output kept being inconsistent each time even when I am making the same gesture.
For example, when I flex, this one the output is between 1500-2500
But after some time the output suddenly became around 5000 and does not react to my flexing. This had happened a few times and I am not sure what is wrong.
There's also some cases where the output is much more higher up to 4095 like this one. I am a little confused about which range of value is the right one?
The circuit is something like this and I had connected the optional reference cable and even cut the jumper trace.
The code is just simple of printing out the values. Connected to pin 27 instead of A0 like the example.
/*
MyoWare Example_01_analogRead_SINGLE
SparkFun Electronics
Pete Lewis
3/24/2022
License: This code is public domain but you buy me a beverage if you use this and we meet someday.
This code was adapted from the MyoWare analogReadValue.ino example found here:
https://github.com/AdvancerTechnologies/MyoWare_MuscleSensor
This example streams the data from a single MyoWare sensor attached to ADC A0.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
*Only run on a laptop using its battery. Do not plug in laptop charger/dock/monitor.
*Do not touch your laptop trackpad or keyboard while the MyoWare sensor is powered.
Hardware:
SparkFun RedBoard Artemis (or Arduino of choice)
USB from Artemis to Computer.
Output from sensor connected to your Arduino pin A0
This example code is in the public domain.
*/
void setup()
{
Serial.begin(115200);
while (!Serial); // optionally wait for serial terminal to open
Serial.println("MyoWare Example_01_analogRead_SINGLE");
}
void loop()
{
int sensorValue = analogRead(27); // read the input on analog pin A0
Serial.println(sensorValue); // print out the value you read
delay(100); // to avoid overloading the serial terminal
}
If there's anyone willing to give advice it is greatly appreciated!!
Some references if needed