-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels
