
Todo: The image of the board indicating the I2C pins
Using I2C
After connecting to the Gemstone operating system, install thei2c-tools
package to write and read data
from I2C addresses.
ls /dev/i2c-*
command.
To view the addresses of devices connected to the i2c-2
bus, run the following command:
In the output above,
UU
indicates that an I2C device is present at that address and is being used by
the system. 40
indicates that a device is present at that address. For example, while reading and writing
operations cannot be performed at address 0x30, they can be performed at address 0x40.0x00
of the device connected to address 0x40
on the i2c-2
bus,
run the following command:
0x80
to address 0x07
of the device connected to address 0x40
on the i2c-2
bus, run
the following command:
The I2C addresses used in the examples (such as 0x40, 0x00, and 0x07) are for demonstration purposes only. The
addresses of I2C devices in your applications may vary. It is important to consult the documentation of the
devices you are using to determine the correct addresses.