Welcome, Guest

Author Topic: Capture data from ECG shield  (Read 815 times)


  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Capture data from ECG shield
« on: December 12, 2017, 06:17:42 AM »
Hey everyone, I’m making a system to save data from ecg shield in a sd card but when I took the saved file and try to plot it I have a lot of noise. I’m using file.write(value) to save data so my code is something like:

for (TxIndex =0; TxIndex<17;TxIndex++)

Can you help Me?  :'(


  • Newbie
  • *
  • Posts: 48
  • Karma: +11/-0
Re: Capture data from ECG shield
« Reply #1 on: December 15, 2017, 08:51:52 AM »
I'm not sure why you are using a for loop and saving only 16 data points.  I don't have a lot of experience saving ecg data to disk, but the few times that I tried it, I saved every data point followed by a comma, ie comma separated values which may then be uploaded into a spreadsheet and plotted.

void loop()
 if (micros() > LoopTimer)
  LoopTimer += LoopTime;
  sensorValue = analogRead(analogInPin); 
  String dataStr = "";
  dataStr += String(sensorValue);
  dataStr += ",";