Desi.123
Posts: 2
Joined: Wed Jul 10, 2019 4:48 pm

Raspberry pi question (Adafruit’s servo bonnet, can I combine it with other HAT's?)

Wed Jul 10, 2019 5:04 pm

Hello all,
I’m fairly new to the raspi community, and have a question about raspi for my project.

So I want to use Adafruit’s servo bonnet, a few other bonnets and a couple of sensors with my raspberry pi zero.

The bonnets and the sensors both need to use the GPIO pins on the pi.
My question is: is there a way to connect multiple raspberry pi’s together to run as one and use all of the GPIO pins?

I’m familiar with the clusters but I’m not sure if I can use the GPIO pins on all the pi’s while using the cluster.

Just to clarify, I want to run one program on the pi’s each pi will have a different function: servos, sensor 1, sensor 2, and so on. I want them all to work as one computer. Is this possible?

Thanks reading! I appreciate any help.

User avatar
topguy
Posts: 5936
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspberry pi question

Thu Jul 11, 2019 5:01 pm

So I want to use Adafruit’s servo bonnet, a few other bonnets and a couple of sensors with my raspberry pi zero.
But what are you going to use them for ?
is there a way to connect multiple raspberry pi’s together to run as one and use all of the GPIO pins?
Not really, you can make a distributed application, different programs on each Pi using MQTT for example to exchange information between themselves.

I've also seen mentions of "pigpio" which is a networked service that also give you access to GPIO pins over the network. If that is something that will work with the sensors and bonnets you plan to use I cant know. ( http://abyz.me.uk/rpi/pigpio/ )

Clustering is mostly about dividing computational tasks between different CPUs.

User avatar
HawaiianPi
Posts: 4854
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Raspberry pi question

Thu Jul 11, 2019 5:12 pm

If the HATs or Bonnets use different pins on the GPIO then you can use more than one at a time, either by wiring the up manually or using a GPIO expander. There are also some GPIO protocols which allow multiple connections, so it all depends on the specific boards you want to use and what they require.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Desi.123
Posts: 2
Joined: Wed Jul 10, 2019 4:48 pm

Re: Raspberry pi question

Thu Jul 11, 2019 8:07 pm

I’m using the sensors and servos for a robotics project.

So my final question is, what GPIO pins does the servo bonnet use.

Thanks for the help

wildfire
Posts: 561
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Raspberry pi question

Thu Jul 11, 2019 8:17 pm

That would be a question to ask ADA Fruit. It certainly does not qualify as a "Raspberry pi question".

Ada fruits website has a couple of links if you're interested in looking there.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

PhatFil
Posts: 1437
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Raspberry pi question

Thu Jul 11, 2019 8:21 pm

Desi.123 wrote:
Thu Jul 11, 2019 8:07 pm
I’m using the sensors and servos for a robotics project.

So my final question is, what GPIO pins does the servo bonnet use.

Thanks for the help
from : https://www.adafruit.com/product/3416
The Adafruit 16-Channel 12-bit PWM/Servo Bonnet will drive up to 16 servos or PWM outputs over I2C with only 2 pins.

i2c pins...
https://pinout.xyz/pinout/i2c

kflmiami420
Posts: 62
Joined: Thu Mar 21, 2019 6:54 pm

Re: Raspberry pi question

Thu Jul 11, 2019 8:59 pm

You can make the raspberry pi zero w work with I2C connected sensors , hats , a/d converter work connected to (SCL pin gpio 5) and (SDA pin gpio 3)

You can have the I2C servo hat and then connect sensors I think its up to 7 sensors as long as they have different addresses .
Some sensors allow you two different address other dont and have a fixed one.

Research well the sensors you want for your project to collect data and they they dont have the same address as the servo bonnet.

You can also get an MCP3008 to read analog sensor reading connected via SPI that does not conflict with I2C sensors like tmp36 or light sensor, some gas sensors , anamometer , ETC....

They also make an I2C analog to digital converter .

Start small get your robot ( vehicle moving first ) then add one sensor at time . it will make your project easier to go along . Once you get it moving and recording the 1 sensors data then you can add more ..
Attachments
1_qtE-Ket0V74lorCLZLiHTg (1).png
1_qtE-Ket0V74lorCLZLiHTg (1).png (85.97 KiB) Viewed 333 times

Milliways
Posts: 473
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Raspberry pi question

Fri Jul 12, 2019 4:33 am

"Raspberry pi question" - what other kind of question would you ask on this site?
This is remarkably uninformative.

User avatar
topguy
Posts: 5936
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Raspberry pi question

Fri Jul 12, 2019 11:11 am

"Raspberry pi question" - what other kind of question would you ask on this site?
A lot of very generic Linux or programming questions are being asked ( and answered ) all the time on this forum. While the question is usually asked in the context of a Pi, the answers are not Pi specific because the Pi is basically just another Linux/Debian computer.

Also you cant expect the regulars on this forum or the RPF people to know all about every third-party product. Sometime we just have to refer back to the manufacturer.

For a Pi beginner neither of these things are obvious so I usually try not to be too rude about it. ;)

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12398
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Raspberry pi question (Adafruit’s servo bonnet, can I combine it with other HAT's?)

Fri Jul 12, 2019 11:16 am

Changed the subject to a more informative one.

Its a bonnet, not a full HAT, meaning its not using the serial EEPROM, so yes that is good.
If the other HAT isn't using I2C there should be no problem, if it is using I2C, makes sure there is no address conflict.

the bonnet uses a PCA9685, get a datasheet for it, and look up what address it uses. and if you can change it in case it conflicts.

p.s. the bonnet has six address changing pads!

Return to “General discussion”