Hi there!
For a school project we want to use a infrared lightsensor that can measure the heart rate.
We are using Arduino Uno and Matlab to aqcuire this data.
However, we don't understand the incomng data and therefore do not know how to process it into BPM.
This is our code:
function result = plot_graph(t, a)
value = zeros(t, 1);
for i = 1:t;
value(i) = readVoltage(a, 'A2');
end
plot(value);
end
The plot gives values ranging from 3.4 to 3.5 without clear structure. Also, because the difference between the high and low peaks is so small, we are uncertain how to read the data.
Can anybody tell whether the code is correct or how to transform the acquired signal in something that makes more sense?
Thanks!