EMG for stress monitor filtering

I'm using an arduino along with an EMG board to obtain surface EMG data. I'm looking to filter and process the incoming signal in real time to provide feedback on stress levels. I have two main questions:

1) Is it possible to filter the signal within the loop and output the signal using only Arduino in real time or do I need to interface it with another software? I'm having a hard time understanding how the memory works in terms of storing the data, processing it, and then outputting it.

2) I'm looking to have a set sampling rate. The EMG provides an analog signal, but I haven't been able to come up with an efficient way of setting the sampling rate so any suggestions would be helpful!

Thanks!

  1. Depends on sampling rate and complexity of the filtering. I think, UNO capable to process ~20 ksps with simplest 2-nd order IIR low-pass. My understanding, EMG needs much lower rate.
  2. Start from AC version from this link http://coolarduino.blogspot.ca/2015/08/analog-meter-dc.html there is sampling subroutine .

I'm using the Arduino Nano and MyoWare EMG sensor. With this, how do I go about filtering the data and outputting the desired plot of the processed EMG data within Arduino? Any advice would be greatly appreciated!

Pololu has some resources, have you seen? https://www.pololu.com/product/2732/resources There is an example code, though very primitive.