Welcome to IMU Sensor Module repository
For Raspberry Pi 5
Viewing IMU Data on Raspberry Pi
Viewing IMU Data on Raspberry Pi1. Connecting the Device2. Viewing Device Status3. Installing Driver Libraries3.1 Download the Python driver library file3.2 Transferring files3.3 Installing Driver Libraries4. View IMU data5. Precautions
1. Connecting the Device
This tutorial uses a Raspberry Pi 5 motherboard and the official 64-bit image as an example.
Connect the IMU attitude sensor to the host's USB port using a Type-C cable.

2. Viewing Device Status
View Device ID
xxxxxxxxxxlsusb
View Device Number
xxxxxxxxxxls -l /dev/ttyU*
3. Installing Driver Libraries
3.1 Download the Python driver library file
The latest version of the driver library, named YbImuLib.zip, is provided in the data folder.

3.2 Transferring files
Drag the compressed driver library 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 installation 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_Serial.py file to the Jetson, and then run the command
xxxxxxxxxxpython3 YbImu_ReadData_Serial.py
Note: The above data reads are for a 9-axis IMU. Data from the 6-axis IMU is not available from the magnetometer or barometer, and data from the 9-axis IMU is not available from the barometer.
5. Precautions
If you can find the device ID but not the device serial number, you can refer to the following commands to install the ch34x driver:
xxxxxxxxxxsudo apt remove brlttygit clone https://github.com/clhchan/CH341SER.gitcd CH341SERmake -j6sudo make installsudo modprobe ch34x