Adding a PiSense hat on top of GrovePi+

Greetings -
I’m wondering if there’s any issue in adding a PiSense hat to the top of my GrovePi? I’d rather not lose the D5/6 plugs, but I’m not aware of another way to attach multiple hats. If it’s not showing already, I’m pretty new to all this.
The end goal is using the assembled group to run an autonomous robot. I’ll also be adding a grove motor board and servo controls.
I do realize there’s grove sensors that do the same functions (IMU, display) as the PiSense, but I have the PiSense now!
Thanks in advance for suggestions.

I am interested to hear what Dexter response is to this question but I would assume so, I assume both boards use IC2 protocol to communicate so as long as they have different address it will be fine. With IC2 you can stack anything that has a different address without a conflict.

Hi @bigal & @Shane.gingell

So, both of these boards (the GrovePi and the PiSense) use I2C and SPI.
In both of these cases, the I2C is the de facto protocol used for data communication, so this is a good thing because you can have multiple devices on the same line.

I haven’t got a chance to work with PiSense, but by looking at the specs I see that it’s using the SPI protocol for reprogramming the AVR chip.
So, as long as you don’t have to have to burn the AVR of any of these 2 boards, you should be fine.
But if you want to reprogram them, you’ll have to stack one board at a time on the Raspberry Pi and do the operation.

Also, check for I2C address conflicts when stacking the 2nd board (the PiSense).
Pay attention that the GrovePis address is 0x04.

Thank you!


I did a quick attempt last evening, and they don’t seem to be compatible unfortunately. I only had a few minutes to spare, sorry about that. But I couldn’t find why they were not compatible. On paper it looks like they should be.

On another note, if/when you want to add another board to GrovePi and don’t want to sacrifice any of the grove ports, you can get this little header from Adafruit.
Works well for me.


I was looking for some sort of “splitter” that would allow me to use multiple hats without stacking, but that suggestion looks great!
As far as didn’t work, in terms of? Neither board was addressable or? Perhaps a power supply issue?
I’m gonna give it a shot today. Since you didn’t say it killed anything, worst I can do is lose some time.
Thanks, Al

This may sound stupid but does the order their stacked in matter?

Hello @bigal
I only ran the python library on the Sense Hat and it crashes right at the start.
from sense_hat import SenseHat sense = SenseHat()

Also, i2cdetect doesn’t show any conflict but one of the values for the Sense Hat is changed when it’s connected to the GrovePi as opposed to being a standalone. I don’t have an idea as to why. In theory there’s no conflict. Practice says otherwise

Can you change the address of the Grove Pi or sense hat to avoid conflict?

@graykevinb it doesn’t matter the order, as they are all stacked in parallel i.e they are all connected at once. If you start to stack large numbers of IC2 devices you can eventually get a power drop problem but this shouldn’t be a problem with only stacking 2 hats.

Not knowing the sense hat, I don’t know what addresses it uses. Since the sense hat has so many sensors on it, it maybe using multi addresses (different addresses for different sensors)

Most common problem with stacking IC2 devices is usually a conflicting address

To connect multi devices with same IC2 address then you need to use a multiplexer to split it.

Is it possible that the library SenseHat maybe the problem and maybe changing values of the sense hat when it detects the GrovePi??

@cleoqc does the GrovePi have any output on the SPI pins that could be causing the sense hat to change address??

To be honest I’m not that familiar with the Sense Hat other than using it with Scratch, so I’m far removed from its hardware by then. However here’s a link to its connections

Here’s what i2c detect when I only have a sense hat :

And this is what I get when they are stacked:

I just read that 46 (UU) is the bus master for the Pi Sense. Does that address serve a purpose for the Grove Pi? On my RPi3 with just the GrovePi installed, I get 46 showing nothing.

So I don’t see a conflicting address.

Also - I just read a thread on stacking HAT’s and one suggestion (though with a GPS hat instead of PiGrove) was to add “dtoverlay=rpi-sense” to the /boot/config.txt The thread participants claimed that worked perfectly.