You can configure an Arduino/Atmega328P as an I2C slave and use the RPi as an I2C master as an alternative to serial.
To do it with GPIO pins you'll need GNDs connected then wire the Arduino/Atmega328P with a 1K/2K resistor voltage divider to ensure you drop the 5V0 from the Atmega down to 3V3 for the RPi. I've never tried it but it should work OK.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+
Any DMs sent on Twitter will be answered next month.