Disable Omega 2+ i2c so that arduino dock can be i2c master



  • I am having quite a bit of trouble trying to get my arduino dock to work with i2c sensors and their respective arduino libraries.

    The problem seems to be coming from the fact that the omega is the master device and the arduino dock is the slave device, so it cannot use arduino libraries like wire which assumes arduino to be the master.

    May i know is it possible to complete shutdown omega's i2c and make arduino dock the master for the i2c connection? if so i can then transmit whatever data i want from the arduino dock to the omega via uart (serial)?




  • @Zheng-Tean If you can use the pinmux program (forget what onion calls it or if they ship it) to make the relevant pins gpios and then use the /sys/class/gpio functionality to make them inputs (which is probably the default), then they should effectively ignore i2c traffic there from another master provided that the voltage levels are within range.

    However, if the existing i2c is done in a kernel level driver, you may find that you aren't allowed to re-purpose the pins and would have to change the kernel.

    Sounds desperate, but you could always bend the pins or cut the traces.



  • If you are trying to convert the Omega2 I2C pins back to standard GPIO there are instructions in the docs.

    Multiplexed GPIOs

    Specifically if you are trying to return the I2C SDA/SCL pins from default configuration as I2C back to standard GPIO use this command.

    omega2-ctrl gpiomux set i2c gpio
    

    and then configure them for desired GPIO function as you would any other GPIO.



  • @Zheng-Tean i was thinking of placing the omega2 in the breadboard adapter and use wires to link all pins except the 2 i2c pins to the arduino dock. never got around to trying it or even if the idea is so stupid it's a waste of time.



4 out of 4

Looks like your connection to Community was lost, please wait while we try to reconnect.