Guys, during a test using my Micro Maestro 6ch usb sc, I noted that sending a serial data to the controller, with a command for the servo rotates about 10 degrees (from the neutral point), as a result, I got a 16 degrees servo rotation. Probably I’m doing something wrong so, could anyone give me a hand to understand it?
The SSC is connected on a pc with a usb cable, using pololu virtual COM port. A Hitec HS-311 servo was used during the test with a 4.8V battery pack.
the code (C++):
unsigned char serialBytes;
int target, servo = 0;
target = (angle*3000)/45; // converting a angle into PWM, considering neutral point = 1500us = (90°)
DWORD bytesWritten = 0;
serialBytes = 0X84;
serialBytes = servo;
serialBytes = target & 0X7F;
serialBytes = (target >> 7) & 0X7F;
WriteFile(hCom, &serialBytes, 4, &bytesWritten, NULL);
Thanks in advance!!