djsfantasi
- Joined Apr 11, 2010
- 9,237
Then, show your code. As I illustrated, sometimes the obvious calculation returns incorrect results. I cannot comment on why your results are incorrect if you don’t show the calculations themselves. The length of the PWM signal is the period. Without showing how you get the value for period, no one can determine why it appears to be incorrect.I did not calculate frequency in my code, I tried to calculate the length of the PWM then using a linear regression that related PWM to MPH display the MPH, but the PWM values I was reading don’t appear accurate
