X5s2sbQDV

#The7thLiChuangElectricityContest#Real-time posture display

 
Overview


1. The real-time attitude display adds the function of LED indication on the basis of the official case, that is, the number of LED lights increases with the increase of the tilt angle of MPU6050,
   so that the tilt attitude of the attitude display can be clearly understood. 
 
2. I found that when the attitude is displayed on the OLED using the official code, the pitch value will be offset by about 30 degrees, and then I corrected it in the simplest way. After correction, it is placed on a plane and
   displayed at about 0 degrees, as shown in the figure
         
3. The figure below defines the proportional coefficient of the inclination of the three axes XYZ. The coefficient can be adjusted according to the inclination angle of the attitude so that
the number . The larger the value, the less sensitive it is. It is recommended to be between 1 and 11.
 
4. You can understand it by looking at the program and comments in the figure below. It is simple.
 
5. When I sent data through the serial port for these two lines of code, the computer displayed garbled characters. The baud rate, stop bit, word length, etc. were all set to the same as the program, but it was still garbled
  . The reason is unknown, so I simply commented it out.
 
6. The attached video demonstrates the operation of initializing MPU6050. After pressing the reset button, you need to tilt it about 45 degrees and wait for a few seconds for the initialization to complete.
 
7. Demonstration video: https://b23.tv/MlDwnVL
 
 
 
 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 19:26:27

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号