2021-10-26 08:42:17 索煒達(dá)電子 1120
項(xiàng)目編號(hào):E1765
文件大?。?88K
源碼說明:帶中文注釋
開發(fā)環(huán)境:C編譯器
簡(jiǎn)要概述:
采用的是STM32F103C8T6讀取陀螺儀MPU6050的角度數(shù)據(jù)和溫度信息,使用6050自帶DMP庫(kù)姿態(tài)解算出各個(gè)方向的角度,并使用OLED實(shí)時(shí)刷新顯示,同時(shí)可以將數(shù)據(jù)通過串口發(fā)送到計(jì)算機(jī),每一組數(shù)據(jù)50ms。本操作過程簡(jiǎn)單,只涉及了屏幕驅(qū)動(dòng)顯示和陀螺儀數(shù)據(jù)的讀取,非常適合功能移植。
制作出來的實(shí)物圖如下:
硬件說明:本實(shí)驗(yàn)采用的是1.3"寸的OLED屏幕+STM32F103C8T6最小系統(tǒng)開發(fā)板。
接線說明:SH1106 I2C OLED屏幕:SDA:PA7 SCL:PA5;MPU6050接線:SDA:PB7 SCL:PB6
供電說明:都是3.3V供電。
如需更改為0.96"寸屏幕顯示,只需要修改相關(guān)地方而處:oled.c文件
目錄│文件列表:
└ C8T6 mpu6050簡(jiǎn)單讀取
│ 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