You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My main aim is to count Beats per minute form pulse sensor and displaying it on a display.
I am using the code from the example section of the pulsesensor playground. and clubbing it with my display.
I am using the following to build my project-
Pulse sensor
Arduino Uno
Nokia 5110 LCD display
Problem -
As I am using the code from examples as well as I have created a custom code to display the bpm along with the graphics.
Both the code are running correctly without any error individually i.e [ 1) detecting the heartbeat and calculating bpm 2) custom display to display an integer for about a second ].
But when I club both the code together code together to display bmp on display for a second and refreshing it, the program starts to malfunction and shows garbage value when there is no figure on sensor.
My assumption and doubt-
it is not advised to use delay for more than 20ms. but if I print the calculated bpm on display with the 20ms display it cannot be visible to the human eye and if I increase delay t0 200ms the pulse sensor will skip a beat and malfunction )
so what is the possible solution for it?
I tied to use millis() but it seems both timers cannot work together and throw a compilation error for uno.
IT doesn't look like the LCD library is messing too much with the Pulse Sensor code, but there must be something happening. It looks like the LCD library is using direct port control of the Arduino.
You might want to try to use the BPM_Alternative example. In that case I would suggest the following changes to what you already have.
First, don't use any delays in your loop.
Second, add a variable lastBPM that you can compare myBPM with
My main aim is to count Beats per minute form pulse sensor and displaying it on a display.
I am using the code from the example section of the pulsesensor playground. and clubbing it with my display.
I am using the following to build my project-
Pulse sensor
Arduino Uno
Nokia 5110 LCD display
Problem -
As I am using the code from examples as well as I have created a custom code to display the bpm along with the graphics.
But when I club both the code together code together to display bmp on display for a second and refreshing it, the program starts to malfunction and shows garbage value when there is no figure on sensor.
My assumption and doubt-
it is not advised to use delay for more than 20ms. but if I print the calculated bpm on display with the 20ms display it cannot be visible to the human eye and if I increase delay t0 200ms the pulse sensor will skip a beat and malfunction )
so what is the possible solution for it?
I tied to use millis() but it seems both timers cannot work together and throw a compilation error for uno.
please help me
I really appreciate it.
thanks
lcd.zip
The text was updated successfully, but these errors were encountered: