0

I've recently bought a Triple GPIO Expansion Board in order to connect multiple sensors to my Raspberry pi while the number of open GPIOs (like model 3 B) are limited. This board has 4 sets of 40 GPIO pins and each column labeled as JP1 to JP4. I was wondering how can I set a specific pin while all look same with even the same pin number? In another word, How can I specify the pin for example 11 on the second column (JP2)? There should be a way to distinguish between each array of the board when defining the GPIO pin numbers in our code! for example:

I want to have a control on each GPIO separately in order to turn it on/off

LED_pin = 11 # @ JP1 Servo_IN1 = 11 # @ JP2

Thanks

  • 2
    As joan points out that board provides 3 connections to each pin, it does not triple the number of GPIOs. For that you need a microcontroller. – goldilocks Mar 28 '18 at 9:16
1

You may have a misunderstanding about the purpose of the board.

The Pi's with the 40 pin expansion header have 28 GPIO (the rest of the pins are power rails and ground).

The expansion board just offers (the vendor would argue) a more convenient way to connect to those expansion header pins.

It provides no more GPIO, nor does it let you route a GPIO to an alternate pin. It just gives multiple connection points to an expansion header pin.

  • Thanks for your answer. Could you recommend me a proper board/expansion for my purpose in order to have multiple and separate GPIOs (compatible with Raspberry pi3B/B+)? – Ehsan Mar 28 '18 at 16:22
  • I'm afraid shopping suggestions are explicitly off-topic. If you have a particular application in mind it might be worth asking a new question. – joan Mar 28 '18 at 16:38
0

If you want to expand the number of IO pins available, you are probably looking at a product like this one that uses the I2C bus to add extra digital IO above the existing ones on the Pi. This is the part: https://www.abelectronics.co.uk/p/54/io-pi-plus These are stackable boards, so you can add a few of them to get over a hundred IOs. You can access the I2C with Python fairly easily. This board uses the MCP23017 Port expander chip, and if you feel ambitious, you can use it directly by following this tutorial: https://www.raspberrypi-spy.co.uk/2013/07/how-to-use-a-mcp23017-i2c-port-expander-with-the-raspberry-pi-part-1/

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.