Is there any documentation showing how to set up I2C communications on the Jetson Nano Orin so that it can be accessed in a python program? There are many examples I can find for the original Jetson Nano Developpers Kit, but I do not think the instructions that are valid for the Nano can be used on the Orin Nano without some modifications.
My goal is fairly simple - I am trying to set up a Pan-and-Tilt servo mechanism with a PCA9685 board to run on the Jetson Orin Nano Developers Kit. If the setup for doing this in a python program is already documented somewhere, please direct me to the documentation. For reference, I am using a Nvidia carrier board and Jetpack 5.1.1.
In order to access the GPIO pins on the Jetson Nano you are instructed to follow the instructions below. Note the last two steps. I do not see the file that is supposed to be copied anywhere on the Jetson Orin Nano, so I donβt understand how the GPIO access rules are supposed to be set. Are these instructions no longer required on the Orin?
I tried a simple test program (python) using pin3 for SDA and pin5 for SCL. It does not generate any errors, but does not initiate any action on the servos (nothing happens for a little while, then the program ends). I suspect I can not make this work unless the rules for GPIO access are properly enabled. Has anyone successfully run the I2C bus on the Orin Nano, if so what steps did they follow? For reference here is the test program I used:
import time
from adafruit_servokit import ServoKit
for i in range(20,160,2):
kit.servo[0].angle=i
time.sleep(.05)
for i in range(160,20,-2):
kit.servo[0].angle=i
time.sleep(.05)
for i in range(40,160,2):
kit.servo[1].angle=i
time.sleep(.05)
for i in range(160,40,-2):
kit.servo[1].angle=i
time.sleep(.05)
This version did not generate any errors, but once again, it did not cause anything to happen on the servos.
The other version generated this:
Traceback (most recent call last):
File β/home/steve/python/robot/pantilt1.pyβ, line 7, in
kit = ServoKit(channels=16, i2c=i2c_bus, address=0x40)
File β/usr/local/lib/python3.8/dist-packages/adafruit_servokit.pyβ, line 89, in init
self._pca = PCA9685(
File β/usr/local/lib/python3.8/dist-packages/adafruit_pca9685.pyβ, line 150, in init
self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
File β/home/steve/.local/lib/python3.8/site-packages/adafruit_bus_device/i2c_device.pyβ, line 62, in init
self.__probe_for_device()
File β/home/steve/.local/lib/python3.8/site-packages/adafruit_bus_device/i2c_device.pyβ, line 184, in __probe_for_device
raise ValueError(βNo I2C device at address: 0x%xβ % self.device_address)
ValueError: No I2C device at address: 0x40
Iβm going to try a different i2c device like an oled displayβ¦
One last comment. The SSD1306 library works fine, but I have not been able to get the PCA9685 board working with any library I have tried: adafruit-pca9685, adafruit-circuitpython-pca9685, adafruit-circuitpython-servokit or adafruit-servokit.
The challenge seems to be how to specify that I want to use bus 7. I havenβt given up, but the jetson nano is looking better around hardware and library compatibility, but I would very much like to take advantage of the more powerful processing capabilities of the Jetson Orin Nano dev kit.