servo position's

Good day.
Im trying to get a RC servo to go to a specific position when analogread is a specific value.
i started out with the servo example but it's not what i need.
im reading voltage of analogread and this is what i get.
Volts. output.
0,32 63
0.670 135
0.995 201
1.320 268
1.643 334
1.997 406
2.321 472
2.635 537
2.960 604
3.320 677
3.645 744
3.980 812
i need to map the values to servo positions who would i do it ?

Have you tried using the map() function?:

http://www.arduino.cc/en/Reference/Map

Also - where are these values coming from that you are using analogRead()? A potentiometer? Some other sensor/method?

Whatever method, the output would need need to be linear (or linearized in software) for this to work as you are expecting...

:slight_smile:

The data is coming from a Yaesu FT-817 (Band data) ranging from
0.32 volts to 3.98.
the voltages correspond to the band the radio is on. with this i am trying to drive a servo that in turn drives a variable capacitor in an antenna tuner.
Band(m) Voltage Data(1-1024)
160 0,32 63
80 0.670 135
40 0.995 201
30 1.320 268
20 1.643 334
17 1.997 406
15 2.321 472
12 2.635 537
10 2.960 604
6 3.320 677
2 3.645 744
0.7 3.980 812

Thanks.