Intervalls

Hello. I want to adjust a servo with a regular potentiometer. I am using the code map(). The servo go from 0 - 179 (degrees) and the value from the pot is from 0 - 1023.. what I want to do is to just take in every 5 values from the pot. Like in java we can write 0:5:1023. Is there such command in the Arduino program? Or can I do this another way?

Kind regards, -Alex

Use the map() function.

Are using the map() function.. we map the potentiometer value versus the servo value.. but the input from the pot is going from for example 450 - 453, so I want to get every 5 values så that the servo is not "lagging" if u understand?