【E1765】STM32读取MPU6050传感器角度和温度数据OLED显示 源程序

2021-10-26 08:42:17      索炜达电子      806     

项目编号:E1765

文件大小:388K

源码说明:带中文注释

开发环境:C编译器

简要概述:

采用的是STM32F103C8T6读取陀螺仪MPU6050的角度数据和温度信息,使用6050自带DMP库姿态解算出各个方向的角度,并使用OLED实时刷新显示,同时可以将数据通过串口发送到计算机,每一组数据50ms。本操作过程简单,只涉及了屏幕驱动显示和陀螺仪数据的读取,非常适合功能移植。

制作出来的实物图如下:

【E1765】STM32读取MPU6050传感器角度和温度数据OLED显示 源程序

硬件说明:本实验采用的是1.3"寸的OLED屏幕+STM32F103C8T6最小系统开发板。

接线说明:SH1106 I2C OLED屏幕:SDA:PA7        SCL:PA5;MPU6050接线:SDA:PB7        SCL:PB6

供电说明:都是3.3V供电。

如需更改为0.96"寸屏幕显示,只需要修改相关地方而处:oled.c文件

【E1765】STM32读取MPU6050传感器角度和温度数据OLED显示 源程序

目录│文件列表:

 └ C8T6 mpu6050简单读取

    │ keilkilll.bat

    │ README.TXT

    ├ CORE

    │  │ core_cm3.c

    │  │ core_cm3.h

    │  │ startup_stm32f10x_hd.s

    │  └ startup_stm32f10x_md.s

    ├ HARDWARE

    │  ├ LED

    │  │  │ led.c

    │  │  └ led.h

    │  ├ MPU6050

    │  │  │ MPU6050.c

    │  │  │ mpu6050.h

    │  │  ├ DMP

    │  │  │  │ dmpKey.h

    │  │  │  │ dmpmap.h

    │  │  │  │ inv_mpu.c

    │  │  │  │ inv_mpu.h

    │  │  │  │ inv_mpu_dmp_motion_driver.c

    │  │  │  └ inv_mpu_dmp_motion_driver.h

    │  │  └ IIC

    │  │     │ IIC.c

    │  │     └ IIC.h

    │  ├ OLED

    │  │  │ bmp.h

    │  │  │ oled.c

    │  │  │ oled.h

    │  │  └ oledfont.h

    │  └ TIME23

    │     │ TIME.c

    │     └ TIME.h

    ├ OBJ

    │  └ Template.hex

    ├ STM32F10x_FWLib

    │  ├ inc

    │  │  │ misc.h

    │  │  │ stm32f10x_adc.h

    │  │  │ stm32f10x_bkp.h

    │  │  │ stm32f10x_can.h

    │  │  │ stm32f10x_cec.h

    │  │  │ stm32f10x_crc.h

    │  │  │ stm32f10x_dac.h

    │  │  │ stm32f10x_dbgmcu.h

    │  │  │ stm32f10x_dma.h

    │  │  │ stm32f10x_exti.h

    │  │  │ stm32f10x_flash.h

    │  │  │ stm32f10x_fsmc.h

    │  │  │ stm32f10x_gpio.h

    │  │  │ stm32f10x_i2c.h

    │  │  │ stm32f10x_iwdg.h

    │  │  │ stm32f10x_pwr.h

    │  │  │ stm32f10x_rcc.h

    │  │  │ stm32f10x_rtc.h

    │  │  │ stm32f10x_sdio.h

    │  │  │ stm32f10x_spi.h

    │  │  │ stm32f10x_tim.h

    │  │  │ stm32f10x_usart.h

    │  │  └ stm32f10x_wwdg.h

    │  └ src

    │     │ misc.c

    │     │ stm32f10x_adc.c

    │     │ stm32f10x_bkp.c

    │     │ stm32f10x_can.c

    │     │ stm32f10x_cec.c

    │     │ stm32f10x_crc.c

    │     │ stm32f10x_dac.c

    │     │ stm32f10x_dbgmcu.c

    │     │ stm32f10x_dma.c

    │     │ stm32f10x_exti.c

    │     │ stm32f10x_flash.c

    │     │ stm32f10x_fsmc.c

    │     │ stm32f10x_gpio.c

    │     │ stm32f10x_i2c.c

    │     │ stm32f10x_iwdg.c

    │     │ stm32f10x_pwr.c

    │     │ stm32f10x_rcc.c

    │     │ stm32f10x_rtc.c

    │     │ stm32f10x_sdio.c

    │     │ stm32f10x_spi.c

    │     │ stm32f10x_tim.c

    │     │ stm32f10x_usart.c

    │     └ stm32f10x_wwdg.c

    ├ SYSTEM

    │  ├ delay

    │  │  │ delay.c

    │  │  └ delay.h

    │  ├ sys

    │  │  │ sys.c

    │  │  └ sys.h

    │  └ usart

    │     │ usart.c

    │     └ usart.h

    └ USER

       │ JLinkSettings.ini

       │ main.c

       │ stm32f10x.h

       │ stm32f10x_conf.h

       │ stm32f10x_it.c

       │ stm32f10x_it.h

       │ system_stm32f10x.c

       │ system_stm32f10x.h

       │ Template.uvguix.Administrator

       │ Template.uvguix.刘亮

       │ Template.uvguix.黄宁

       │ Template.uvoptx

       │ Template.uvprojx

       ├ DebugConfig

       │  └ Template_STM32F103C8_1.0.0.dbgconf

TAGMPU6050
  • 6 次
  • 1 分