Hi,
Have you tried your code, or are you writing it all at once before checking output.
What model Arduino are you using?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Can I suggest you google arduino tacho
It is not advisable to do all that coding in the interrupt function.
Thanks.. Tom...
[/quote]
The code above haven't been tried yet although the main part of it has been tested in a test rig earlier. I've allways been stuck on the part were the speed exceeds the limit and not been able to get the servo to gradually decrease. Another bottleneck has been, if the gas pedal is floored and the system decreases the gas within limit, what would the effect be then or more importantly how would I avoid that effect.
I'll rig the test rig up again and run it. I'll get back with a schetch.
By the way, it's an Uno.
Also, about the tachometer on Google, been there, done that. Alot