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

Device: BME280 I2C/SPI Temp+Humidity+Pressure Sensor
Adafruit Part Number: 2652
Instructions: Python & CircuitPython Test | Adafruit BME280 Humidity + Barometric Pressure + Temperature Sensor Breakout | Adafruit Learning System
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: Python & CircuitPython | Adafruit MCP9808 Precision I2C Temperature Sensor Guide | Adafruit Learning System
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: Python & CircuitPython | Adafruit SHT31-D Temperature & Humidity Sensor Breakout | Adafruit Learning System
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: CircuitPython | Adafruit I2C FRAM Breakout | Adafruit Learning System
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: Python & CircuitPython | Adafruit INA219 Current Sensor Breakout | Adafruit Learning System
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: CircuitPython Usage | Adafruit Stepper + DC Motor FeatherWing | Adafruit Learning System
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: Python & CircuitPython | Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout | Adafruit Learning System
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: Python & CircuitPython | Adafruit Triple Axis Gyro Breakout | Adafruit Learning System
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: Python & CircuitPython | Adafruit BNO055 Absolute Orientation Sensor | Adafruit Learning System
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: Python & CircuitPython | Adafruit VEML6075 UVA / UVB / UV Index Sensor | Adafruit Learning System
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.

1 Like

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.

these libraries are great. but they are on Python…
Is there any library for C++?
I Have Jetson tx1 and want to integrate with BME280 sensor with I2C on C++.
how can I do that ?

@S4WRXTTCS
when I enter sudo i2cdetect -r -y 1 I see the address 76 of the sensor and the BME280 has been recognized.
but I don’t know how can I using the sensor…
I want to use the BME280 on c++ but no library exists for jetson and c++…
anyone can help me ?