Following our tutorial on how to enable I2C on the camera (please read first), in this tutorial we will see an easy way on how to add more GPIOs using IO Expander
Wiring
The driver uses the PINS:
GPIO 7: label TX2, level 3.3v
GPIO 6: label RX2, level 3.3v
Using IO Expander I2C
A simple way to add more GPIOs is to use boards with PCF8574
This unique model is interesting because it is easy to cascade by connecting several in series.
Reference: https://www.youtube.com/watch?v=mXMkgQf3fqU
Using:
On buildroot precompiled version use this to load kernel driver:
insmod /usr/modules/i2c-gpio.k
Use i2cdetect -l to list the devices (drivers), and use the command : i2cdetect -y NUMBER
, to scan i2C devices
Code Samples
TODO: ….