Continuous Server on 16-Channel Bonnet Doesn't Stop

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
hiramk
 
Posts: 15
Joined: Tue Nov 01, 2022 1:00 pm

Continuous Server on 16-Channel Bonnet Doesn't Stop

Post by hiramk »

I am using the 16-Channel PWM / Servo Bonnet for Raspberry Pi, on a Pi zero 2 w. I attached a continuous servo and ran the Python example from the learn pages: https://learn.adafruit.com/adafruit-16- ... on-library

The motor will change speed and slow down, but never stop.

Any ideas?

import time
from adafruit_servokit import ServoKit

# Set channels to the number of servo channels on your kit.
# 8 for FeatherWing, 16 for Shield/HAT/Bonnet.
kit = ServoKit(channels=8)

kit.servo[0].angle = 180
kit.continuous_servo[1].throttle = 1
time.sleep(1)
kit.continuous_servo[1].throttle = -1
time.sleep(1)
kit.servo[0].angle = 0
kit.continuous_servo[1].throttle = 0

User avatar
dastels
 
Posts: 15831
Joined: Tue Oct 20, 2015 3:22 pm

Re: Continuous Server on 16-Channel Bonnet Doesn't Stop

Post by dastels »

Continuous servos are problematic this way. They will stop if you turn off power to them. Most of them have a set screw that you can use to adjust the 0 position. Set its throttle to 0 and adjust the screw to stop the rotation.

Dave

User avatar
hiramk
 
Posts: 15
Joined: Tue Nov 01, 2022 1:00 pm

Re: Continuous Server on 16-Channel Bonnet Doesn't Stop

Post by hiramk »

HUGE THANKS! I will give this a try!!

User avatar
hiramk
 
Posts: 15
Joined: Tue Nov 01, 2022 1:00 pm

Re: Continuous Server on 16-Channel Bonnet Doesn't Stop

Post by hiramk »

That worked! Never would have figured that out. Once again, much appreciated!

User avatar
dastels
 
Posts: 15831
Joined: Tue Oct 20, 2015 3:22 pm

Re: Continuous Server on 16-Channel Bonnet Doesn't Stop

Post by dastels »

My pleasure.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”