C++ Question

Hi,
I am using the Pololu Maestro Board (24 channel) and i’m trying to program it using Visual Studio. The sample code found is working however only with channel 0. I’ve tried changing the channel number however it doesn’t seem to be affecting it. Any help please?

Hello.

I moved your post to the “Servo controllers and servos” section of the forum since it seemed more appropriate.

It sounds like you are referring to the example in the Windows C section of the Maestro User’s Guide. That example checks the current position of channel 0 and sets a new target based on that reading. The ‘maestroGetPosition()’ and ‘maestroSetTarget()’ implementations in that code are set up to receive the desired channel number as the second argument. So, you would need to change the second argument from 0 to your desired channel number each time you call either of them from your main function.

If you continue to have problems getting it to work, can you post your complete code, as well as the results of running your code (e.g. do you get an error message or any other response)?

Brandon

hi,

The problem was solved. Thank you very much for your help!

Kindest regards,
Michaela