17

I am currently planning a project for a course at school which involves using the Raspberry Pi - however I'm worried that I will not have enough GPIO connectors for the inputs and outputs that I will need for the project. What could I use to allow me to extend the amount of connectors that I can use?

If it is possible, how would I be able to make use of the new connectors using the RPI.GPIO library in Python?

1

4 Answers 4

15

Another option would be to use a port expander to get additional I/O ports. For example, the MCP23008 can connect via I²C (only uses two pins) and gives you eight I/O ports.

Since it uses I²C, up to eight of them can be connected to the same two I²C pins to give you up to 64 I/O pins.

Adafruit has a tutorial about how to use the MCP23008 (or MCP23016, the 16 port version) with the Raspberry Pi. And they have a Python library.

0
5

According to this post you should be able to get 4 extra GPIO pins, but it requires some soldering.

4

Depending on speed and distance to controlled/controlling devices, you can connect DS2408 to the 1-Wire interface.

Each chip provides eight I/O channels. You can attach... many of them. Possibly hundreds. These are not supported by the library, but once you loaded the right modules (modprobe), access is as simple as writing right values to files in /sys/bus/w1/devices/.

Other than that, the P5 header (the two rows of holes next to the GPIO pins) provides a few more GPIOs, and you just need to solder a header in (and yes, they are fully supported by every Raspberry Pi GPIO library).

0

This might work for you:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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