yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
IMU Sensor Module📖
1. Introduction to the IMU Module
  • Introduction to IMU Module
2. Multi-master communication case
1. PC Communication
  • For PC
2. Serial communication
  • For STM32F103C8T6
  • For MSPM0G3507
  • For MSPM0G3519new
  • For ESP32
  • For Arduino
  • For Raspberry Pi Pico
  • For Raspberry Pi 5
  • For Jetson
  • For RDK
3. IIC Communication
  • For STM32F103C8T6
  • For MSPM0G3507
  • For MSPM0G3519new
  • For ESP32
  • For Arduino
  • For Raspberry Pi Pico
  • For Raspberry Pi 5
  • For Jetson
  • For RDK
3. Application Cases of Microcontroller-Based Cars
  • 1. Autonomous Driving Car
4. ROS Application Cases
ROS1 Applications
  • 1. IMU data printing
  • 2. Rviz Visualization
  • 3. IMU-integrated radar mapping and navigation
ROS2 Applications
  • 1. IMU data printing
  • 2. Rviz Visualization
  • 3. IMU-integrated radar mapping and navigation
Download
  • Code
  • VM_File
  • Docker_Image
  • 3D_Model_File
  • Hardware_DataSheet
  • Communication_Protocol
  • PC_Software
Download ZIP

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 SensorJetson nano (Physical Pins)
SDA3
SCL5
GNDGND
3.3V3.3V

2. Check Device Status

First, install I2Ctool. In the terminal, enter:

xxxxxxxxxx
sudo apt-get update
sudo apt-get install -y i2c-tools

Check the I2C device. The I2C address corresponding to the IMU is 0x23

xxxxxxxxxx
sudo i2cdetect -y -r -a 1

image-20251023155718315

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.

image-20251020201127769

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.

image-20251020202437510

If you are unfamiliar with using WinSCP to transfer files, please refer to the following webpage for detailed WinSCP installation and operation instructions:

File Transfer

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.

xxxxxxxxxx
cd ~/Desktop && ls

Unzip the file

xxxxxxxxxx
unzip YbImuLib.zip

image-20251020203316340

Enter the driver library folder

xxxxxxxxxx
cd YbImuLib

Run 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.

xxxxxxxxxx
sudo python3 setup.py install

image-20251022121102993

Install required libraries

xxxxxxxxxx
sudo pip3 install pyserial
sudo pip3 install smbus2

4. 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

xxxxxxxxxx
python3 YbImu_ReadData_I2C.py

image-20251023160802885

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.

image-20251023161322082

For Raspberry Pi 5
For RDK

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文