Hello to everyone! I am a totally newbie, but for a project I need to record an analog value (heart rate, and then calculating BPM), so that I can pick this value when needed using Matlab.
I use and Arduino Uno and have already done both the scripts:
- The Arduino script simply record the analog values from 3 electrodes, and then calculates the BPM value, writing it on the serial monitor each 100ms;
-The Matlab code is automatized so that, in some specific windows, it read the values on the Arduino's serial monitor and then store them in a variable to send specific stimuli.
They works properly, but for safety reasons I need to power the Arduino using batteries, and not through the USB port (I know that the disconnecting the laptop from the AC would solve the problem, but I need to use the hardware even with powered computers). This raise the issue of how to communicate the BPM values to Matlab (it's a must, for the experiment!).
I thought that the bluetooth may help solving the problem (I got an ESP32 at home), so I would like to connect the electrodes to the ESP32, and then power it using batteries or a power bank. Then, when powered, it should write values on the Arduino's serial monitor so that Matlab can read them... I've never done anything similar before, so I'm in search of suggestions on how to do it.
I'm also open to other kind of solutions!
Thanks in advance!
