speeduino
speeduino copied to clipboard
Add tacho sweep function
This enables the "Tachometer sweep on startup" in TunerStudio. The target RPM is slowly ramped at startup for the first second, then holds that level for the next half-second.
Slight tweak to the TCNT2 preload value, based on timing measured on an actual board. Loading the timer at the start of the loop eliminates jitter because varying ISR execution time is eliminated.
Also defines the loop counter terminal counts to be prime numbers, to limit the occurrence of multiple bits being set per loop, which should reduce overall jitter.
Sorry there are few little things in this one commit. I can break them up if needed.
I'm running it and it works nicely
That's great, thanks for testing!