smeagol109:
And if possible, can someone show me a way to improve the code in order to switch the display from rpm's to km/h ?
Speed = RPM * wheel circumference or speed = RPM * Pi * wheel diameter. That will give you inches/minute, which can easily be converted into MPH.
Divide by inches in a mile (63360) and multiply by minutes in an hour (60) or just divide by 1056 (60/63360 = 1/1056)