Hi Folks,
Now I know this has been done and there are instructions everywhere but I’m looking for help on this.
I have a RPI 3B + running PiCore with a HifiBerry DAC (The one with optical out) and a touchscreen.
I seem to get different information from different sources on which GPIO pins to use with HifiBerry saying not to use GPIO3 …
“GPIO3 is uses for the Pi’s I2C bus that is used by many HiFiBerry sound cards to configure the card. Therefore, you can’t monitor GPIO3 state correctly. Also waking the system via GPIO3 can also be problematic as the GPIO is required to configure the HiFiBerry sound card early in the boot process.”
Any advice on this appreciated.
Cheers
Hi Kim,
Welcome to the forum 
Sharing GPIO pins gets a little bit complicated when it comes to the I2C bus. Since I2C is a bus style method of communications it is totally fine to connect multiple hardware devices to the same I2C pins provided all the devices are using those pins for I2C and have a unique address to identify themselves when sharing the bus.
You couldn’t however re-use GPIO3 as a digital output to control an LED while other devices were connected. The GPIO pins are reconfigurable for multiple uses, but they can only have one use at a time, and multiple devices can only be connected to the same physical pins when a bus protocol is in use which dictates how they will share that common interface.
If you could let us know which exact touchscreen you were using we can check what pins it uses and what interface to clear up if there is a conflict between the HifiBerry DAC and the touchscreen.