Possible pin conflict with touchphat and phat beat boards with SPI pins?


#1

Hi, can I check what connections are used for phat beat and touchphat? The reason is because I am using these two phat boards in my project. However, I recently tried to install an OLED display (with the Luma OLED python library) which uses SPI connections and the display appears to be unstable when I try to run a demo script.
I also recieved this warning on terminal when I run the script:

/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py:164: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  self._gpio.setup(pin, self._gpio.OUT)

This led me to think that perhaps one of the boards could be using any of these pins, however I am not completely sure.
Is there any chance that the phat boards uses any of the following pins: GIPO pin 24, GPIO pin 25, MOSI, CLK, CE0?

If they do conflict, are there alternate connections I can use for SPI?


#2

This should help, https://pinout.xyz/#
Or even here, https://pinout.xyz/phatstack

You don’t have to have a pHat Stack to use the second one. Just select your two pHats and see what it says. It showed they were OK for me.


#3

The touch pHat only uses i2c
The pHat beat doesn’t use SPI, but does use quit a few pins. that may be the one causing your issue. You need to know what the pins used by OLED display are.

The pHat Beat uses, GPIO 18 (Clock), not sure if that’s the CLK your referring to, though? .


#4

Thanks alphanumeric. Probably shouldnt be any conflict then. The CLK pin the OLED uses is GPIO 11.


#5

It gets tricky, the more devices you add, especially if they don’t use i2c. The PIN numbering can get you too.
GPIO (Board) uses the actual PIN numbers while GPIO (BCM) uses the GPIO number.
GPIO 11 (BCM) is physical Pin 23 (Board) on the GPIO header. Luckily, I hardly ever see GPIO (Board) used in any Python examples. If you see GPIO.setmode(GPIO.BCM) you know its using GPIO numbers not the physical actual PIN numbers. Hope I’m not confusing you more.