-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem when there is no beat #6
Comments
@tandroutsou, I didn't write the original code, I only adapted it for the Particle devices. You might want to explore the PulseSensor site for more information. |
@pkourany thanks for your answer! Do you think that the following part should also be adapted (2048 instead of 512)? Because in the other places these values have been changed. |
@tandroutsou, I believe setting the values to 2048 at the start is meant to cause the algorithm to fire and eventually get to the (N > 2500) statement which then resets the values to 512. You may want to adjust the values up or down from 512 to see how the sensor responds. I am not sure why the code would not work after not using the sensor for some time. What else is your code doing? One thing you might want to consider is using a MAX30102 pulse-oximeter sensor. It uses I2C and there are libraries available for the Particle devices in the Web IDE and Workbench and CLI. |
Hi there! I am using Photon and Pulse Sensor for a project and the code isn't working as expected when I touch the sensor after a while. You need to touch the sensor twice in order to start calculating BPM again and sometimes it isn't working at all. I thought that the problem was that in the part of the code that 2.5 seconds without a beat have passed P,T and threshold are reinitialized to 512 and not 2048, which is their default value for Photon. I changed them but now BPM is calculated constantly, even when the sensor is not being touched.
Could you help me with this issue?
The text was updated successfully, but these errors were encountered: