# Hyperpixel 4 with touch expansion as GPIO instead of I2C

**URL:** <https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161>\
**Category:** Raspberry Pi\
**Created:** [November 7, 2021, 4:18am UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161 "2021-11-07T04:18:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrandonMcG](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@BrandonMcG](https://forums.pimoroni.com/u/BrandonMcG)\
**Post date:** [November 7, 2021, 4:18am UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161/1 "2021-11-07T04:18:49Z")

</div>

Is it possible to use the expansion header I2C pins as GPIO. Really just input. I have an optically isolated pulled high 3v3 and low active switch I want to use.

---

<div class="post-metadata">

**Author:** ![Shoe](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Shoe](https://forums.pimoroni.com/u/Shoe)\
**Post date:** [November 7, 2021, 9:37am UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161/2 "2021-11-07T09:37:57Z")

</div>

Those pins are used for the touch controller. Even if you have a Hyperpixel without touch, I don’t think using the pins for GPIO is supported in the Hyperpixel library.

What you could do is attach something like an Adafruit Seesaw, and use that to read the switch over I2C.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [November 7, 2021, 9:40am UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161/3 "2021-11-07T09:40:48Z")

</div>

EDIT: Looks like I have it all wrong, ops.

I would “think” that is doable? Their default function is i2c 0 for reading the Hat EEPROM to get setup info etc for the attached HAT.  
GPIO 0, Pin 27, EEPROM Data  
GPIO 1, Pin 28, EEPROM Clock  
Pimoroni just redirect i2c to use i2c 0 instead of i2c 1.  
You may have to undo that and or make sure i2c is turned off. You won’t know until you try using one of those pins.

---

<div class="post-metadata">

**Author:** ![Shoe](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Shoe](https://forums.pimoroni.com/u/Shoe)\
**Post date:** [November 7, 2021, 9:46am UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161/4 "2021-11-07T09:46:24Z")

</div>

> [@alphanumeric](#):
>
> GPIO 0, Pin 27, EEPROM Data  
> GPIO 1, Pin 28, EEPROM Clock

The [Hyperpixel guide](https://learn.pimoroni.com/article/getting-started-with-hyperpixel-4#using-the-alternate-i2c-interface-on-hyperpixel-4-0-for-advanced-users) says that the I2C expansion pins on the screen unit are BCM 10 and 11, I don’t think those are the EEPROM pins.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [November 7, 2021, 9:49am UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161/5 "2021-11-07T09:49:30Z")

</div>

I was going by this, [I2C at Raspberry Pi GPIO Pinout](https://pinout.xyz/pinout/i2c)  
Typo maybe on that page you linked too? Or they are using the touch pins?  
[Hyperpixel4 at Raspberry Pi GPIO Pinout](https://pinout.xyz/pinout/hyperpixel4)

---

<div class="post-metadata">

**Author:** ![Shoe](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Shoe](https://forums.pimoroni.com/u/Shoe)\
**Post date:** [November 7, 2021, 10:12am UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161/6 "2021-11-07T10:12:08Z")

</div>

I don’t think the I2C pins on Hyperpixel are the standard I2C pins, I think they’ve had to shuffle them around seeing as HP4 uses so many pins for different things. The touch controller is apparently I2C controlled, so using those pins makes sense.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [November 7, 2021, 12:06pm UTC](https://forums.pimoroni.com/t/hyperpixel-4-with-touch-expansion-as-gpio-instead-of-i2c/18161/7 "2021-11-07T12:06:11Z")

</div>

@Shoe, I think I got it wrong, what you posted sounds a lot more plausible.
