I2C – NVIDIA Jetson AGX Xavier
Articles Blog

I2C – NVIDIA Jetson AGX Xavier

August 27, 2019


Hello, It’s Jim from JetsonHacks.com. On
today’s show we’re looking at I2C on the Nvidia Jetson AGX Xavier
Developer Kit. Let’s get started There are several I2C buses on the
Jetson. Two of them are exposed on the GPIO expansion header. I2C devices
have a data line and an external clock line. On the Jetson let’s talk about i2c
bus eight first. Pin one of the expansion header is the pin closest to the power
light indicator. There are two pins DAT which is the data (it’s on pin three) and
the clock which is CLK. This is located on pin five. The second I2C bus on the
expansion header is bus one. DAT is on pin 27 and CLK is on pin 28. Today we are
using a seven segment LED backpack from Adafruit. The backpack comes as a
little kit which you must solder together.I will leave a link in the
description below on how to assemble the kit. Before we hook up the 7-segment
display, make sure that the Jetson is not connected to power. Pin one on the
expansion header is located here. The top row contains the odd number pins and the
bottom row is the even number of pins Let’s hook up our display. Pin 2 on the
Jetson is five volts, it goes to the VCC on the display. Pin
six is groun, it goes to ground on the display. Connect pin , which is DAT, to
the SDA pin on the display board. And finally connect pin 5 which is the
CLK to SCL on the display board. Let’s plug in the power and boot this baby up.
We’ll switch over to a different view. Now we are ready to install our software
driver and example. On the JetsonHacks account on Github, there is a repository
named JHLEDBackpack. The branch that we are going to be working out of is here,
L4T31. This is for the Xavier. Let’s look at the directions.
Let’s install these. Now let’s clone this repository. There is a release for this
build. The releases are in the releases tab.
It’s called version 2.0. Let’s switch over to the repositories directory and
we will check out version 2.0. Let’s switch over to the example directory.
Okay we are ready to run make. Let’s make sure we can see our display on the i2c
bus. There it is! Hex 0x70. And let’s run our example Flashing that’s a good sign Okay so it looks like it works. Let’s go
over some of the changes from Ubuntu 16 to a Ubuntu 18. Go back to the source
code. A useful tool is called apt-file. It looks inside a package to see what files
are included. Let’s load that. And let’s list what’s inside libi2c-dev. libi2c-dev is different in Ubuntu 16 versus Ubuntu 18. In Ubuntu 18 we use i2c/smbus and libi2c as a library. So
we have to change our source file around a little. We add i2c/smbus here.
Notice that we wrap it as “C” calling convention. And then in our example. Let’s
go look at that. In our make file we add libi2c here. Just as a reminder on JetsonHacks.com, we have the pin outs of the different developer kits. If we look on
AGX Xavier we can see the i2c on 3 & 5 and i2c on 27 and 28. if you liked this
video give it a thumbs up. If you have not already, please subscribe. Thanks for
watching!

Only registered users can comment.

  1. How do I move from the Arduino API's (Wire.h) to the jetson ones
    How do I move from:
    Wire.beginTransmission( , Wire.write(, Wire.endTransmission(, Wire.read( …

Leave a Reply

Your email address will not be published. Required fields are marked *