the one thing i have noticed is that sometimes the address for the device differs, e.g., the ADXL345 module uses 0x53 but the corresponding click board is available at 0x1d.
with all that said, could you educate me on a couple of things:
first, there's /dev/i2c-0 and /dev/i2c-1 - what's the difference? are these just adapter numbers without any significance?
second, is it possible to determine which addresses are present? i spent some time hunting around /sys/class/i2c-dev/ and /sys/class/i2c-adapter/ but nothing looks familiar.
third, i'm assuming that the i2c addresses are unique for each kind of click board, so if i had two click boards of the same kind on my system that there would be an address conflict? is that usually solved via jumper or is it a non-issue?
dev/i2c-0 is just a device file that provides the interface to your hardware.
You can use the wire.scan function. Or, just type i2cdetect -y 0
They shouldn't conflict addresses. I think it's up to the manufacturer to prevent i2c conflicts. There is nothing in the i2c spec to deal with conflicts. You could build a translation module if needed, but I haven't really heard of anyone running into this issue.
hi. i authored a module -- https://github.com/TheThingSystem/node-click-boards -- that uses your module in order to talk to the click boards.
i then used the driver in https://github.com/timbit123/ADXL345 as a template for writing drivers.
thus far i have the ADXL345 (no surprise) and the L3GD20 running, both individually, and together just fine, e.g.,
the one thing i have noticed is that sometimes the address for the device differs, e.g., the ADXL345 module uses 0x53 but the corresponding click board is available at 0x1d.
with all that said, could you educate me on a couple of things:
first, there's /dev/i2c-0 and /dev/i2c-1 - what's the difference? are these just adapter numbers without any significance?
second, is it possible to determine which addresses are present? i spent some time hunting around /sys/class/i2c-dev/ and /sys/class/i2c-adapter/ but nothing looks familiar.
third, i'm assuming that the i2c addresses are unique for each kind of click board, so if i had two click boards of the same kind on my system that there would be an address conflict? is that usually solved via jumper or is it a non-issue?
sorry for the lack of clue...