i have the Adafruit 16 Channel PWM/Servo shield and connected 3 servos to it. The Servos run in clockwise direction.
Now I need to run one of the servos in counter-clockwise direction, due to the way they are set up in a testing environment.
From the library reference: setPWM(channel, on, off)
Code: Select all
for (uint16_t pulselen = SERVOMIN; pulselen < 237; pulselen++) {
pwm.setPWM(servonum, 0, pulselen);
I've read, that by changing the length of the pulse (either increasing or decreasing it) i can change the direction, in which the servo moves. But apparently i was unable to change the length of the pwm-signal.
I thought maybe by using a higher "on" value i could influence the pulse length, but that give me the desired result. Instead of going in the other direction, the servo started moving a bit later.
Any thoughts/help would be greatly appreciated
Thanks in advance