Hi,
I would like to use the Yun with I2C. My plan is to use the kernel I2C subsystem and the kernel modules as the are. How does the bridge between the AR9331 and the *Mega work?
Do I have to use the *Mega or is there a kernel solution to use some GPIO-I2C kernel module?
However, that will not help you as all IO lines to the AR9331 go to something on the 32U4. So best bet is use the 32U4 I2C libraries and talk over the serial bridge to the 32U4. There is a library called Wire for the 32U4 that talks I2C.
How does the bridge between the AR9331 and the *Mega work?
I am able to bridge AR9331 with Uno by using Yun Bridge library, both sides has to modify (procedure is a quite long). Linino side is software modify, the Uno is software and hardware mod.
Yeah, I was wondering why on the main Yun page it said this:
TWI: 2 (SDA) and 3 (SCL). Support TWI communication using the Wire library.
Thanks for pointing that out.
It would be nice to do I2C from the 9331, but the option without modding (rewiring) something is the 32U4. Which really, is probably just as fast as bit banging GPIO on the 9331. And the task does not eat up CPU time on the 9331 except for serial comms to the 32U4. Also, you could add another processor via USB connection that handles I2C as well. So it can be expanded other ways too. IMO the I2C via the 32U4 is a good option.
Yeah I would like to bypass the 32U4 and do I2C (bitbang) on the AR9331. Its sad to hear this is not possible without solder (modify) the YUN. The project have to base on unmodified boards. At the moment I think of an i2c-tiny-usb interface hooked on the USB port.
Actually, you may be able to still bit bang from the AR9331 on the Yun.
Look at page 4 of the schematic for the Yun. It brings GPIO to the NTB0104UK chips. Those chips are auto direction sensing level converters 3.3V <-> 5V logic. So if you put the pins on the 32U4 into high z mode then you could bit bang those pins on the AR9331. Now if those need to be 3.3V you need to level convert them back, but it does give you access to some of the pins. It is at least worth a look. You could do the same for the TX/RX lines, but you lose AR9331 to 32U4 comms that way. But if that does not matter to you then those could be big banged too.