Skip to content

BPM is giving way too high value #90

@msaibhvani

Description

@msaibhvani

I am using the STM32f103c8 microcontroller using Arduino software with a pulse sensor and the value its showing is way too high it's going from 2000 to 4000. I am attaching my code here.
// Variables
int PulseSensorPin = PA0;
unsigned long int mybpm = 0;
int i;
int Sam_mybpm;
void setup() {
Serial.begin(115200);
}

void loop() {
mybpm = 0;
for (i=1;i<=1000;i++)
{
mybpm = mybpm+analogRead(PulseSensorPin);
Serial.print(mybpm);
}
Sam_mybpm = mybpm/1000;
Serial.print("Sam_mybpm");
Serial.println(Sam_mybpm);
delay(1000);
}
The picture of my pulse sensor

20200303_120002

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions