I am making a program that moves servo motor based from input from computer vision through camera. im writting the program with QT Creator 4.7 as compiler and im using C++ as the laguage. my OS is WIndows 7 64 bit.
To move the servo motor, i am using pololu micro maestro 6 ch servo controller.
I have checked the example program given by the pololu, and i have read the example Visual C++ program. from what i read from the example program, i think the servo motors are moved by the TrySetTarget function which also responsible for the communication with the pololu.
So i need help if someone here have the code for equivalent C++ function of TrySetTarget to be used in QT Creator compiler, becasue i need it for QT, and i know i can not just copy paste from visual c++ to the QT, while i dont know what modification i should do to convert it to QT compatible.
Thanks in advance
I think the best option for you is to use the Maestro’s virtual serial port interface. We have some example C code for Windows which you should be able to integrate into your Qt application. The sample code can be found in the “Serial Example Code > Windows C” section of the Maestro User’s Guide. Be sure to follow the instructions in that section for how to configure the Maestro.
If you do not need particularly fast updates, you could also consider invoking the command-line utility UscCmd from your Qt program.
thank you, it worked, i controlled the servos through maestro with QT c++
but now i am trying to control 2 pololu micro maestros 6ch with the sam QT.
i have tried to plug 2 micro maestros to my laptop, but when i ran the program, only one micro maestro responded to the program. the servos that connected to the other micro maestro 6ch did not move at all.
can you please help me again ?
how can i control 2 micro maestro servo controllers in the same time with QT creator in c++
Hello. The answer depends on how your QT program is talking to the Maestro. Are you invoking UscCmd or are you connecting to one of the Maestros’ virtual COM ports?