Add water level to grow hat

I’m using a grow hat in my greenhouse. I have added a float switch to my water reservoir and want to use that to send a mail that the water is low. I can do all the coding, the question I have is physically how to attach the water level switch.

I could solder it onto the back of a couple of gpio pins but I’m looking for a nicer way.
I’m thinking the i2C headers using a suitable breakout board. Thing is I can find any info on how to connect to that. Anyone done this and have any ideas? Do I need to solder wires to the grow hat or is there some connector that I can plug in?

You will need to either solder wires, or a header to the grow hat.
If your just going to wire the one float switch, I’d use the INT pin and GRD.
The INT pin connects to GPIO4, physical pin 7 on the Pi.
You can use that and not have to mess with i2c.
It’s a custom pin used on some breakouts. You can use it just like a normal GPIO though.

Another option is to use a proto board with a stacking header.
Adafruit Perma Proto Bonnet Mini Kit (
2x20 pin Female GPIO Header for Raspberry Pi – 11mm (

Then put that between your pi and hat. Then wire your float switch to it.
You can use any GPIO pin thats not already used by the Grow Hat.

Thanks for the reply. I think going direct to the gpio and leaving the i2c free in case I want to use it later for a temperature sensor is the best option.

I’ll need to source a connector so I can connect and disconnect the float switch.
Thanks for the link too.

This may be overkill, but the price is right. I’ve used them a few times. I just put heat shrink over the part I solder my wires too. Makes a nice sturdy connection.