We want to calculate the heart rate from an ECG signal with an ECG toolbox like HeartPy, how can we do this?

Last Updated on August 20, 2023 by pg@petergamma.org

We can find here in the example of the BITalino Matlab toolbox how to do this. This does not need advanced coding skills, only a little bit of scripting:

Example of Measuring Heart Rate from Acquired ECG Signals (see under examples):

https://ch.mathworks.com/matlabcentral/fileexchange/53983-bitalino-toolbox

We suppose it is the same with HeartPy in Python. Nobody reinvents the weel, also not Paul van Gent with HeartPy. We can record data to .txt files with the OpenBCI GUI, and we can then analyse the data with HeartPy. But the OpenBCI GUI offers also the option a BrainFlow streamer.

https://docs.openbci.com/Software/CompatibleThirdPartySoftware/Matlab/

This is eventually easier than starting with the examples in the BrainFlow documentation. We don’t need LSL, we don’t need OCS, we can use BrainFlow, is this not simpler? And we suppose it should also be possible to stream in sensor data on this pathway to a database such as sQlite, which is easier to handle with than InfluxDB.