Welcome to 10-axis IMU Navigation Module repository
1. serial port application routine
STM32 application routines
1. Hardware preparation
Win10 computer, IMU module (data interface leaded), micro-USB data cable, CH340 module, DuPont cable.
Note: The IMU module interface affects the warranty after welding, please consult customer service for details.
2. Hardware connection
Connect STM32 serial port 1 to the CH340 module, and plug the CH340 module into the USB port of the Win10 computer.
Connect STM32 serial port 2 to the serial interface of the IMU module.
Connect the micro-USB cable to the USB port of STM32 and Win10 computers as the power supply for STM32.
If it is our STM32F103RCT6 core board, the on-board Type-C interface can replace the CH340 module, and the computer can be connected directly through this interface.
3. Software programming
For specific codes, please refer to the source code in the data.
This example sets the baud rate of serial port printing to 115200 bps and the baud rate of IMU module connection to 9600. The baud rate of STM32 serial port 2 can be modified according to the baud rate of the IMU module.
Read and print data from the IMU module.
4. Experimental effect
After the program is downloaded into STM32, open the serial port assistant (configuration parameters as shown in the figure below), you can see that the data of the IMU module has been printed, and when we change the attitude of the IMU module, the data will change.