Wiringx is not working for Arduino to Rockpi connection

I am trying to communicate with an arduino from my rock pi 4, but it is telling me
I2C Setup failed: -1. How do I begin debugging wiringx?

I checked the cables (sda, scl, gnd). Everything is powered. They are both on the same channel (0x04). wiringx compiled correctly. And the arduino is sending signals correctly. Just seems like the rockpi is not reading the i2c signals correctly.

I haven’t yet figured out which i2 bus I get with pins 3 and 5

I always assume bus 0 or bus 1 but the label i2c7_sda and i2c7_scl really confused me
Maybe it is tied to device tree but I don’t know.

Post your results ,

wiringX is not supported on ROCK Pi 4. Please use libmraa:


Any good guides on reading info from an arduino to a rockpi 4 using libmraa? So far the libmraa guides are not helping

Depends on what exactly you need

If you want to have arduino talking with rock pi 4 via I2C. The arduino should be in i2c slave mode, you can refer the slave code here:


On the rockpi 4 side, first you can use the i2ctool to scan the i2c buses:

sudo apt-get install i2c-tools
sudo i2cdetect  -y  7  #the bus you are connecting the arduino
1 Like