Continuous potentiometer as revolution counter or tachometer

MohamedArafat:
I need a code

It's your job to write the code. If you run into problems we will try to help.

If you want to use a continuous potentiometer to count revolutions then just increment your count every time the value from analogRead() changes from a high value to a low value or vice versa if it is turning in the other direction.

If you want someone to write a program for you please ask in the Gigs and Collaborations section of the Forum and be prepared to pay.

...R