0

So I'm using a Raspberry Pi Model 3b and an Adafruit 12-bit PWM Servo/PWM Pi Hat on my project to control 6 independent continuous servos. I'd like to send in signals that would turn the servo by that definite angle. I saw docs that let me calculate the servo angle and send in the signals but all of them do it on a single servo motor by using the GPIO pins and changing the duty cycle. Now, while using the piHat, is there a way for me to use the changeDutyCycle() function and thus control the 6 servo motors precisely?

  • You can't command continuous servos to an angle. Do you mean normal servos? Of course you can set the dutycycle independently. Have you looked at the documentation? – joan May 25 '18 at 16:12
  • @joan I meant servos that turn have 360 degree rotation. In particular I'm using this servo. I use the setPWM command from Adafruit library as shown here. I'd like to know how could I define a function (setAngle) that would turn it to a specific angle, say 90, if I give a command setAngle(90). – Guru May 26 '18 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.