Arduino NANO as USB > I2C adapter

Hi,

I've bought a few NANO (v3.0) boards to use it as an "USB to I2C adapter" for Debian Linux.
(Similar to this ... but that firmware is not stable.)

Is there any STABLE release of an .ino file I can simply:

  • download
  • overwrite the name + serial (So multiple pieces can be distinguished)
  • compile and upload
  • Plug into a Raspberry to have more I2C busses. :slight_smile:
  • works at least at 100KHz rate

Thank you in forward!
PS: I'm searching for a solution for the last 4! days, (ca. 30 hours) without success. That's why 'I've just registered here ..

Not exactly what your looking for as its a hardware solution instead of a fix of the firmware you linked to.
Google "i2c multiplexer" gives lots of options but the most promising is this or this if you must have it in a RPi pluggable version.

Dear Riva,
Thank you VERY much for these links :grinning:

Normally that would solve this problem, but in my case it's a "chicken-egg case":

  • to have at least one I2C port connected via USB > I need at least 1 of these boards with a firmware.
  • (I can not use the RPi's I2C port directly only the USBs, and it's 3m far. :confused: )*
  • if I have such a firmware >> I won'T need any expanders or multiplexers, because I can simply flash my other NANOs too and use simply an USB HUB + even 5m USB cables to connect more. :smiley:
    (With I2C those distances are tricky, and would probably transfer only 10Kbit instead of 480Mbit base. Need to connect lots of I2C devices with same address, so splitting into separate Buses is a must for a whole home-automatisation project.)

Still, I'm very happy you are trying to help me. (Nobody else did so far.)

I'm no use with trying to modify this project to suit your board. I can see a couple of values that need changing to suit the Nano but have no way of compiling a hex file from that.

I would suggest you buy the hardware to match the pre compiled main.hex file in the repository.
Not affiliated to the ebay supplier but there appears to be two versions available here and here. I suggest you maybe buy one of what suits best (direct USB connection / USB connector) and see if it works as you want.