I'm having some troubles getting my Raspberry Pi 3+ to work with the IO Pi Plus. I'm testing this IO expander for the first time, but always get following error: "Failed to write to i2c device for write"
- Instead of using the OI Pi Plus header, I used a few jumper wires for now to connect 5V, GND, SDA and SCL from the Pi to the OI Pi Plus.
- Also removed the solder jumper link already (I will use a seperate 5V power supply in the future).
- No changes to addresses, so 0x20 for IC 1 (000) and 0x21 for IC 2 (001).
- Pre loaded NOOBS
- Geany for C programming
- Installed the ABElectronics libraries
- ARM I2C enabled in raspi-config
I'm using the demo-iopiread.c code (see also /ABElectronics_C_Libraries). When compiling, I first got 5 warnings "implicit declaration of function" (strerror, write, read, close and usleep), by adding #include <unistd.h> to ABE_IoPi.c, I removed 3 warnings (write, read, close). Don't know how to get the 2 other warnings go away, but not really my concern for now, I guess.
When I run the demo code, one of the first things to execute is function IOPi_init(0x20)
Then function write_byte_data
And then when the code fails
I'm searching for hours now and can't figure out why I can't write/communicate to the MCP23017 .
I'm not even sure if this is an hardware or software problem.
Can someone help me with this issue?
Thank you in advance