ECG project with Blynk (Urgent)!

Hi,
I am working on making a portable ECG device and was hoping to use BLYNK to display the ECG in the app.
The output voltage of my hardware is around 3v. I am using Nodemcu with ESP8266, pin A0 for ADC conversion.
FYI, the ECG has a frequency of about 1Hz. So I need to get the 10 data points(maximum possible on blink) each second on the graph.

Any idea how what kind of code would I need to use for BLYNK?

You mean 10hz right?

This is a bare minimum command to send data to a virtual pin and thus a display Widget.

Blynk.virtualWrite(vPin, digitalRead(pin));

Blynk.virtualWrite(vPin, analoglRead(pin));

All the rest you need to know is in the Documentation, Help Center and Sketch Builder… get reading… STAT! :stuck_out_tongue_winking_eye:

statim (stat) “immediately” Medical shorthand used following an urgent request.

No. My hardware works at 1 Hz frequency. Because the heart beats approximately once per second. So for me getting atleast 5 data points each second would be ideal. Would that be doable?

 void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V5, millis() / 1000);
}

So I assume its possible. Can you suggest what change I need to make one value each 6 milisecond.

That is 200 ms intervals so why are you are you asking

For reference if you change the 1000 to 200 you will get the 200ms.

6 ms is not possible on a cloud based server.

Okay. That’s helpful. I think 200ms would be a good sampling rate.
Thank you.

Be aware that this function and command you referenced is NOT a timer :wink: it is a value sent to a display showing total millis() since boot divided by 1000, thus it is part of the 1 second up time display function that is called by a timer… so changing this number will not do what you want.

You need to work with adjusting the value of the timer itself…

timer.setInterval(1000L, myTimerEvent);