i am so sorry i am writing for first time in a forum for arduino, the range of p is 0 5000 maximum, i didn t know how to measure rpm with time so i think i will do it with millis . The other program is for measuring voltage (and i want t add rpm) to a curtain current . For the sensor i didn t find a code so i am attaching a photo ,thank you very much and am sorry for mistakes.