EMG Arduino Nano and simple Sketch

Started by all315, March 16, 2020, 11:24:40 PM

Previous topic - Next topic

all315

Hello, can I use the EMG-EKG shield with an Arduino Nano?

I want to use it for emg biofeedback and not to control a servo.

My first step is to visualize on the serial monitor the succession of the EMG values detected and amplified by the sensor. Can I use this simple sketch for this purpose?


void setup() {
  Serial.begin(9600);
}

void loop() {
 
  int sensorValue = analogRead(A0);
 
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V)
  float voltage = sensorValue * (5.0 / 1023.0);
 
  Serial.println(voltage);
}

I use this sketch with another emg sensor and works fine. Will it work with Olimex EMG-EKG shield?

Thank you.

LubOlimex

The hardware is alright. The code won't work. Use our demo for SHIELD-EKG-EMG and OLIMEXINO-328:

https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/resources/ShieldEkgEmgDemo.zip

The software is based on OpenEEG's protocol that can be seen here:

http://openeeg.sourceforge.net/doc/modeeg/firmware/modeeg-p2.c
Technical support and documentation manager at Olimex