Skip to content

Interfacing pulse senor with display shows abnormal reading #68

@bhavindave9

Description

@bhavindave9

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.

  1. 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.

please help me

I really appreciate it.

thanks
lcd.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions