Adafruit I2C devices on the Jetson Nano

I wanted to share some of the results I’ve gotten when testing various I2C devices/sensors from Adafruit on the Jetson Nano using the Circuit Python Libraries.

Here is the initial tutorial I followed
https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano?view=all

Device: BME280 I2C/SPI Temp+Humidity+Pressure Sensor
Adafruit Part Number: 2652
Instructions: https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout/python-circuitpython-test
Results on Jetson Nano/TX2: Works great, and I haven’t experienced any problems with it running on the Jetson Nano or the Jetson TX2.

Device: MCP9808 High Accuracy I2C Temp Sensor
Adafruit Part Number: 1782
Instructions: https://learn.adafruit.com/adafruit-mcp9808-precision-i2c-temperature-sensor-guide/python-circuitpython
Results on Jetson Nano/TX2: Worked great on the first execution of the code. On the second execution of code there was a large delay for “mcp = adafruit_mcp9808.MCP9808(i2c_bus)” so somehow something wasn’t cleaned up properly from the previous run.

Device: Sensirion SHT31-D Temp&Humidity Sensor
Adafruit Part Number: 2857
Instructions: https://learn.adafruit.com/adafruit-sht31-d-temperature-and-humidity-sensor-breakout/python-circuitpython
Results on Jetson Nano/TX2: Worked great on the first execution of the code. But, then it couldn’t find the device on the second execution. I tried using i2cdetect to find it, but it’s not there. If I unplug the device, and replug the device back in I still get the same bad result. The only way short of power cycling the Jetson is to ground the reset pin on the device briefly. This resets the device so then it’s detectable. This result does not make any sense to me, but its repeatable.

Device: I2C Non-Volatile FRAM
Adafruit Part Number: 1895
Instructions: https://learn.adafruit.com/adafruit-i2c-fram-breakout/python-circuitpython
Results on Jetson Nano/TX2: It didn’t list how to install the device specific library, but “sudo pip3 install adafruit-circuitpython-fram” seemed to work. The code also seems to be wrong since it lists board.SDA before board.SCL. So it comes back with "No hardware I2C on (scl, sda). Reversing those two results in “No I2C device at address: 7c”. I reported the problem on the GitHub repository for this library.

Device: INA219 I2C Current Sensor
Adafruit Part Number: 3650
Instructions: https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout/python-circuitpython
Results on Jetson Nano/TX2: Worked great on the first execution of the code. On the second execution of code there was a large delay (around 10 seconds) before spitting out the results.

Device: DC Motor + Stepper Driver
Adafruit Part Number: 2927
Instructions: https://learn.adafruit.com/adafruit-stepper-dc-motor-featherwing/circuitpython
Results on Jetson Nano/TX2: Worked great on the first execution of the code. On the second execution of code there was a large delay (around 10 seconds) for the MotorKit library to initialize. Note: I had to change the I2C bus when I tested it with my Jetson Nano board. I changed it by adding “i2c_bus0=busio.I2C(board.SCL_1, board.SDA_1))”, and using “kit = MotorKit(i2c=i2c_bus0)” to call the library.

Device: VL6180X Distance Sensor
Adafruit Part Number: 3316
Instructions: https://learn.adafruit.com/adafruit-vl6180x-time-of-flight-micro-lidar-distance-sensor-breakout/python-circuitpython
Results on Jetson Nano/TX2: Worked great on the first execution of the code. On the second execution of code there was a large delay (around 10 seconds) before spitting out the results.

Device: Triple-Axis Gyro Breakout Board
Adafruit Part Number: 1032
Instructions: https://learn.adafruit.com/adafruit-triple-axis-gyro-breakout/python-circuitpython
Results on Jetson Nano/TX2: Worked great on the first execution of the code. On the second execution of code there was a large delay (around 10 seconds) before spitting out the results.

Device: 9-DOF Absolute Orientation IMU Fusion Breakout Board
Adafruit Part Number: 2472
Instructions: https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/python-circuitpython
Results on Jetson Nano/TX2: Worked great on the first execution of the code. On the second execution of code there was a large delay (around 10 seconds) before spitting out the results. The WebGL example works well on the Jetson TX2. I didn’t test it on the Nano because I didn’t see how to change the I2C channel on that example.

Device: VEML6075 UV Sensor
Adafruit Part Number: 3964 (note: It’s discontinued so you might not find it)
Instructions: https://learn.adafruit.com/adafruit-veml6075-uva-uvb-uv-index-sensor/python-circuitpython
Results on Jetson Nano/TX2: Comes back with “No I2C device at address 10”. Initially I assumed this was a wiring issue because i2cdetect also fails to find it. But, if I reboot the Nano and then do “sudo i2cget 0 0x10 0x0c w” it reads the address just fine. So it can be used with i2cget commands, but the adafruit python library for it does not work.

Conclusion: Most of the stuff I tested does seem to work, and the only significant issue is the delay the second time the Python code is loaded.

Nice! Thanks for sharing!

I updated the post to include test results from the BME280 Sensor, and the VL6180X Distance Sensor.

I can’t figure out why all of them except for the BME280 have a large delay in loading the device library on subsequent runs. Where it loads almost immediately the first time, but there is large 20+ second delay the second time unless I run i2cdetect between the runs.

Hello, I followed the instructions of python-circuit python for DC motor + Stepper Motor. But, I got the errors

No I2C device at address:60

and when I detect the i2c devices in both buses, no device is found although the motor driver is powered on and connected the pins correctly. How can I do it? Thanks.

So neither of the following two commands detect Motor Driver?

sudo i2cdetect -r -y 0
sudo i2cdetect -r -y 1

If that’s the case then it’s likely a wiring error.

I have noticed that sometimes the female wire headers I have will have a poor connection. So you might play with the wires a bit when getting the i2cdetect app to try to find the motor.

If it’s still not working then I’d recommend taking a picture, and posting it to see if the pinout matches what I have.

I updated the post to include results from testing the Adafruit Triple-Axis Gyro, and the Adafruit Absolute Orientation IMU. I also added the results of the VEML6075 UV Sensor Breakout Board.