Electronic governor

Hello just wondering if anyone can help me with a project that i am building. Its is a simple one. All i want to do is put a servo motor on a engine throttle and control it with a 10k pot, (thats all good i can build that) but what i want to do next is add a hall effect sensor to read the rpm so when the engine's rpm drops the hall effect sensor will move the servo motor to keep it at the rpm. So what i want is a electronic governor.

Moderator edit: Hijacked, off-topic thread split, title changed. AWOL

I'd look into the PID library. This will do he process control calculations. You feed it an error value (how far off the engine speed is) and it gives you a corrective output (how to set the throttle).