0

How to control Servo using Adafruit 16 channel servo control
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: How to control Servo using Adafruit 16 channel servo con

by dastels on Mon Aug 02, 2021 8:24 pm

Back to Carter's question... what version of python is python?

What happens if you use
Code: Select all | TOGGLE FULL SIZE
python3 prog.py

Dave

dastels
 
Posts: 7294
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control Servo using Adafruit 16 channel servo con

by syedmfaheem on Mon Aug 02, 2021 8:59 pm

dastels wrote:Back to Carter's question... what version of python is python?

What happens if you use
Code: Select all | TOGGLE FULL SIZE
python3 prog.py

Dave


Please find attached screenshot. I executed two commands in screen shot.
1- python --version
2-python3 prog.py
Attachments
screenshot4.png
screenshot4.png (147.88 KiB) Viewed 107 times
screen6.jpg
screen6.jpg (323.82 KiB) Viewed 107 times

syedmfaheem
 
Posts: 16
Joined: Sat Jul 24, 2021 8:42 am

Re: How to control Servo using Adafruit 16 channel servo con

by dastels on Mon Aug 02, 2021 10:42 pm

Apologies, I glossed over where you mentioned the Python version.

Dave

dastels
 
Posts: 7294
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control Servo using Adafruit 16 channel servo con

by dastels on Mon Aug 02, 2021 10:44 pm

Is i2cdetect is reporting devices at addresses 40 and 70?

Dave

dastels
 
Posts: 7294
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control Servo using Adafruit 16 channel servo con

by syedmfaheem on Mon Aug 02, 2021 10:50 pm

dastels wrote:Is i2cdetect is reporting devices at addresses 40 and 70?

Dave
Attachments
screenshot7.jpg
screenshot7.jpg (63.47 KiB) Viewed 103 times

syedmfaheem
 
Posts: 16
Joined: Sat Jul 24, 2021 8:42 am

Re: How to control Servo using Adafruit 16 channel servo con

by dastels on Tue Aug 03, 2021 9:53 am

Well, that's why it's failing. Have you tried shutting down the Pi and bringing it back up?

Dave

dastels
 
Posts: 7294
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control Servo using Adafruit 16 channel servo con

by syedmfaheem on Tue Aug 03, 2021 10:31 am

dastels wrote:Well, that's why it's failing. Have you tried shutting down the Pi and bringing it back up?

Dave


I rebooted but still same out put. Then I re-verify my previous steps.

1- Executed command sudo apt-get install python-smbus
2- Executed command sudo apt-get install i2c-tools
3- I followed https://learn.adafruit.com/adafruits-ra ... guring-i2c
4- Executed command reboot

Please find attached screen shots. Please advice.
Attachments
screenshot8.jpg
screenshot8.jpg (120.97 KiB) Viewed 93 times
screenshot9.jpg
screenshot9.jpg (308.94 KiB) Viewed 93 times

syedmfaheem
 
Posts: 16
Joined: Sat Jul 24, 2021 8:42 am

Re: How to control Servo using Adafruit 16 channel servo con

by adafruit_support_carter on Tue Aug 03, 2021 10:43 am

You'll need to solder on the 2x20 socket header to the Servo HAT.

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: How to control Servo using Adafruit 16 channel servo con

by syedmfaheem on Tue Aug 03, 2021 10:46 am

adafruit_support_carter wrote:You'll need to solder on the 2x20 socket header to the Servo HAT.


I did't understand.

Did you mean 40-Pin Pi GPIO Stacking Header all 40 pins point need to solder?

Please advice.

syedmfaheem
 
Posts: 16
Joined: Sat Jul 24, 2021 8:42 am

Re: How to control Servo using Adafruit 16 channel servo con

by adafruit_support_carter on Tue Aug 03, 2021 11:06 am

The part shown here needs to be soldered in place on the HAT. Same would be true for any header option used, like stacking.

header.jpg
header.jpg (62.99 KiB) Viewed 88 times


Just to be sure what you're trying to do - are you wanting to add stacking headers? Similar to the option discussed here?
https://learn.adafruit.com/adafruit-16- ... cking-hats

Also note that the servo header pins also need to be soldered on. The ones you actually plug the servo into.

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: How to control Servo using Adafruit 16 channel servo con

by dastels on Tue Aug 03, 2021 12:16 pm

Good catch.

Yes, syedmfaheem, headers always need to be soldered. It is really the only way to get a reliable electrical connection, which is especially important for communication signals like I2C, SPI, and even UART. It also provides a string mechanical connection.

Soldering well is probably the most useful skill you can learn if you want to work with electronics.

For more information/tips on soldering see https://learn.adafruit.com/adafruit-guide-excellent-soldering and https://learn.adafruit.com/collins-lab-soldering.

Dave

dastels
 
Posts: 7294
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control Servo using Adafruit 16 channel servo con

by syedmfaheem on Tue Aug 03, 2021 12:20 pm

adafruit_support_carter wrote:The part shown here needs to be soldered in place on the HAT. Same would be true for any header option used, like stacking.

The attachment header.jpg is no longer available


Just to be sure what you're trying to do - are you wanting to add stacking headers? Similar to the option discussed here?
https://learn.adafruit.com/adafruit-16- ... cking-hats

Also note that the servo header pins also need to be soldered on. The ones you actually plug the servo into.


Thank you. After solder showing input in 40 and 70 , program start working and servo start moving.

Thank you very much for your time and efforts.
Attachments
screenshot-10.jpg
screenshot-10.jpg (23.33 KiB) Viewed 83 times

syedmfaheem
 
Posts: 16
Joined: Sat Jul 24, 2021 8:42 am

Re: How to control Servo using Adafruit 16 channel servo con

by adafruit_support_carter on Tue Aug 03, 2021 1:10 pm

Woot! Cool. Glad it was something simple. Good job getting it soldered! Hope your project goes well. Have fun!

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.