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
The main issue in your code is that you are using 'byte' to count the pulses.
Why did you assumed that you can store max 255 pulses in one second?
It coulbe be a lot more and because of that the counter is reseting and it's counting from zero again within the same second.
I think the reason why you had to choose different number for the equation that the vendor provides (F=(8xQ-4) it's because of that. Please change that byte to unsigned int and it should work a lot better.
Activity