first version of the program which returns the value of the RPM of the engine in Hertz(Hz) using an interrupt function