GPIO

Configuration of your RPi to support GPIO devices.

To communicate with GPIO devices either SPI (Serial Peripheral Interface) or I²C (Inter-Integrated Circuit) bus is used.

To configure your device you need to specify control pins, use physical numbers. You can find neat pinout reference here.

SPI

To enable SPI device you need to use

sudo raspi-config

Go to #5 Interfacing options and enable P4 SPI kernel module.

There’s a known issue with SPI access on a certain version of Raspbian image, please refer to this thread for troubleshooting.

Usually when configuring device in go-home you need to specify bus and device ID, they’re required for accessing correct device under /dev/spidev<X>.<Y> where X is a bus and Y – device.

I2C

To enable I²C device you need to use

sudo raspi-config

Go to #5 Interfacing options and enable P5 I2C kernel module.