Welcome to IMU Sensor Module repository
For Jetson
Viewing IMU Data on Jetson
Viewing IMU Data on Jetson1. Connecting the Device2. Check Device Status3. Install Driver Library3.1 Download Python Driver Library File3.2 Transfer Files3.3 Installing Driver Libraries4. View IMU data5. Precautions
1. Connecting the Device
This tutorial uses the Jetson Nano motherboard as an example.
Connect the IMU attitude sensor to the Jetson Nano's I2C interface as shown in the diagram below.

| IMU Attitude Sensor | Jetson nano (Physical Pins) |
|---|---|
| SDA | 3 |
| SCL | 5 |
| GND | GND |
| 3.3V | 3.3V |

2. Check Device Status
First, install I2Ctool. In the terminal, enter:
xxxxxxxxxxsudo apt-get updatesudo apt-get install -y i2c-tools
Check the I2C device. The I2C address corresponding to the IMU is 0x23
xxxxxxxxxxsudo i2cdetect -y -r -a 1
3. Install Driver Library
3.1 Download Python Driver Library File
The latest version of the driver library, named YbImuLib.zip, is provided in the data folder.

3.2 Transfer Files
Drag the driver library compressed file onto the Jetson desktop using WinSCP software.
The driver library file can be deleted after successful installation.

If you are unfamiliar with using WinSCP to transfer files, please refer to the following webpage for detailed WinSCP installation and operation instructions:
3.3 Installing Driver Libraries
Open the terminal on your Jetson Nano and enter the following command to extract the files.
Access the desktop and check if the file exists; the target file is highlighted in the red box.
xxxxxxxxxxcd ~/Desktop && ls
Unzip the file
xxxxxxxxxxunzip YbImuLib.zip
Enter the driver library folder
xxxxxxxxxxcd YbImuLibRun the installation command. If you see the version number displayed at the end, the installation was successful. This command will overwrite any previously installed Rosmaster_Lib driver library.
xxxxxxxxxxsudo python3 setup.py install
Install required libraries
xxxxxxxxxxsudo pip3 install pyserialsudo pip3 install smbus24. View IMU data
Refer to 3.2 File Transfer, use WinSCP to transfer the YbImu_ReadData_I2C.py file to the Jetson Nano, and then run the command
xxxxxxxxxxpython3 YbImu_ReadData_I2C.py 
Note: The above data is from a 9-axis IMU. Data from the 6-axis IMU is not available from the magnetometer or barometer. Data from the 9-axis IMU is not available from the barometer.
5. Precautions
When using an Orin series motherboard, the I2C bus number needs to be modified according to the actual situation. The modification location is shown in the image below. It is usually bus number 7.
