Hi Dekel,
From what I understand you are trying to adjust the position of the servo with input ranging from 0 to 255.
angle = 50 %You can take any value from 0-255
angle = angle/255 %This changes the value to the range of 0-1
writePostition(s,angle);
Now if you want to read the value in range of 0-255 just multiply 255 to current_pos instead of 180
current_pos = readPosition(s);
current_pos = current_pos*255;
For more details refer to the Documentation