-
Notifications
You must be signed in to change notification settings - Fork 208
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
Calculate the average of pulse #59
Comments
I did this in interrupt.ino where it is reading from A0 |
Interesting. Also, are you resetting the Signal variable to 0? If not, you are just adding and adding to it. |
Ok i'll try that... I'm using arduino pro mini and i'm using timer1 as it mentioned that is used 9 and 11 pin and my 9th and 11th pin are not free will it cause a problem or should i use timer2 for pro mini 5v version |
which is more stable? and what is the threshold value so that i could minimize the noise |
The only thing that the Timer selection does to those pins is not allow you to use PWM. As for the threshold, you will have to play around with the default value of the thresh varialbe in the interrupts |
Okay.. please suggest me which timer i should use for pro mini 5v 16mhz ? |
You could use either one. |
How i can calculate the average of pulse sensor? I have tried this code but it didn't worked and even the values didn't showed up in serial monitor and in processing.
`
for(int i=0; i<64; i++)
{ // Average over 16 measurements
Signal += analogRead(pulsePin);
}
Signal= Signal/64;
`
The text was updated successfully, but these errors were encountered: