Converting a value to a servo position

Good morning, i am working on a project to create a physical gauge output for a railway simulator,

the output from the simulator to a com port is a value between 0-10 which updates in real time

I’ve purchased the Maestro (6 output) which i’m hoping will do what i want to do

how would i go about converting the value being outputted into the correct value for the position of the servo to point at the correct number on the gauge, as i have no idea what i’m doing

regards Ian Pidgley

Hello.

There are probably a lot of ways you could go about doing something like that.

Do you have any control over the simulator output? If you could format the output to send the “Restart Script at Subroutine with Parameter” command, you could write a script that accepts the 1-10 value and outputs the associated servo position. You can find more information about that command in the “Serial Script Command” section of the Maestro user’s guide.

If you don’t have the ability to manipulate the output of your simulator, you could probably use a separate microcontroller like an Arduino or one of our Arduino-compatile A-Star controllers to read that value and control the Maestro via the TTL serial interface. With this approach, you might consider using our Maestro library for Arduino to make that communication easier.

Brandon