Welcome to Jetson AGX Orin repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
06.I2C communication
I2C Communication Function
I2C Communication Function1. GPIO Pin Diagram2、I2C Testing2.1、Installing Dependencies2.2、I2C Devices2.2.1 Querying the I2C Bus2.2.2 Querying I2C Devices2.3 Running the Program3. Experimental Results
1. GPIO Pin Diagram
Use a 0.91-inch OLED screen (not included) to test the I2C communication function. Connect the pins as shown below:
Caution: Do not connect incorrectly or cause a short circuit. Errors may damage the motherboard hardware!

| GPIO.BOARD | OLED screen pins |
|---|---|
| 1 | VCC |
| 3 | SDA |
| 5 | SCL |
| 9 | GND |
2、I2C Testing
2.1、Installing Dependencies
sudo pip3 install smbussudo pip3 install Adafruit_SSD1306

2.2、I2C Devices
During normal development, we need to find the device bus and device address of the I2C device.
2.2.1 Querying the I2C Bus
The following command in the terminal will list all buses for the device:
xxxxxxxxxxi2cdetect -l
2.2.2 Querying I2C Devices
The following command in the terminal will list the I2C devices under a specified bus: The I2C address corresponding to OLED is 0x3c
xxxxxxxxxxi2cdetect -y -r *

2.3 Running the Program
oled_i2c.py is not included in the jetson-gpio library:
xxxxxxxxxxcd ~/jetson-gpio/samples/
xxxxxxxxxxpython3 oled_i2c.py
3. Experimental Results
After starting the program, the OLED will display system information such as CPU usage, system time, and memory usage:

