本实验将实现如下功能:本实验串口1将不停的打印信息到电脑上,同时接收从串口发过来的数据,把发送过来的数据直接送回给电脑。
注意:本实验串口波特率需设置为115200.
//STM32F4工程模板-库函数版本
//淘宝店铺:http://mcudev.taobao.com
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
本资源为STM32F407-四路超声波测距代码,测试绝对可用 我所使用的测距模块是HC-SR04,HC-SR04超声波测距模块可提供2cm-400cm的非接触式距离感测功能,测 距精度可达高到3mm; HC-SR04基本工作原理: (1)采用IO口TRIG触发测距,给最少10us的高电平信呈。 (2)模块自动发送8个40khz的方波,自动检测是否有信号返回; (3)有信号返回, 通过IO口ECHO输出一个高电平, 高电平持续的时间就是超声波从发射到返回的时间。 测试距离=(高电平时间*声速(340M/S))/2。 程序编写思路是:1、配置好使用到的GPIO以及定时器; 2、给模块TRIG端口发送大于10us的高电平信号,当收、收到ECHO回响信号是,打开定时器开始定时; 3、当回响信号消失,关闭定时器; 4、通过定时器定时时间来确定距离。
资源推荐
资源详情
资源评论
收起资源包目录
STM32F407-四路超声波测距代码 (158个子文件)
USART.uvgui.2hi9uo 85KB
USART.uvguix.2hi9uo 85KB
USART.uvgui.Administrator 137KB
USART.axf 399KB
keilkilll.bat 399B
stm32f4xx_tim.c 122KB
stm32f4xx_rtc.c 100KB
stm32f4xx_rcc.c 97KB
stm32f4xx_adc.c 67KB
stm32f4xx_flash.c 62KB
stm32f4xx_can.c 59KB
stm32f4xx_cryp_aes.c 57KB
stm32f4xx_usart.c 57KB
stm32f4xx_fmc.c 55KB
stm32f4xx_i2c.c 53KB
stm32f4xx_dma.c 52KB
stm32f4xx_spi.c 51KB
system_stm32f4xx.c 47KB
stm32f4xx_sai.c 45KB
stm32f4xx_fsmc.c 41KB
stm32f4xx_ltdc.c 39KB
stm32f4xx_sdio.c 38KB
stm32f4xx_pwr.c 37KB
stm32f4xx_cryp.c 35KB
stm32f4xx_dma2d.c 27KB
stm32f4xx_dac.c 26KB
stm32f4xx_hash.c 26KB
stm32f4xx_gpio.c 25KB
stm32f4xx_dcmi.c 18KB
stm32f4xx_rng.c 14KB
misc.c 11KB
stm32f4xx_cryp_tdes.c 10KB
stm32f4xx_wwdg.c 10KB
stm32f4xx_exti.c 10KB
stm32f4xx_cryp_des.c 10KB
stm32f4xx_hash_sha1.c 10KB
stm32f4xx_hash_md5.c 9KB
stm32f4xx_syscfg.c 9KB
stm32f4xx_iwdg.c 9KB
stm32f4xx_dbgmcu.c 7KB
timer.c 7KB
hc-sr04.c 6KB
stm32f4xx_flash_ramfunc.c 5KB
stm32f4xx_it.c 4KB
delay.c 4KB
usart.c 4KB
stm32f4xx_crc.c 4KB
main.c 1KB
sys.c 470B
stm32f4xx_tim.crf 443KB
stm32f4xx_rcc.crf 434KB
timer.crf 433KB
main.crf 430KB
usart.crf 430KB
stm32f4xx_usart.crf 428KB
hc-sr04.crf 426KB
stm32f4xx_gpio.crf 425KB
delay.crf 425KB
system_stm32f4xx.crf 425KB
stm32f4xx_exti.crf 424KB
sys.crf 424KB
stm32f4xx_syscfg.crf 424KB
misc.crf 423KB
stm32f4xx_it.crf 423KB
stm32f4xx_syscfg.d 2KB
stm32f4xx_usart.d 2KB
stm32f4xx_exti.d 2KB
stm32f4xx_gpio.d 2KB
system_stm32f4xx.d 2KB
stm32f4xx_tim.d 2KB
stm32f4xx_rcc.d 2KB
stm32f4xx_it.d 2KB
timer.d 2KB
main.d 2KB
hc-sr04.d 2KB
usart.d 2KB
delay.d 2KB
misc.d 2KB
sys.d 2KB
startup_stm32f40_41xxx.d 67B
USART_STM32F407VE.dbgconf 2KB
USART_USART.dep 35KB
stm32f4xx.h 688KB
core_cm4.h 107KB
stm32f4xx_tim.h 50KB
stm32f4xx_fmc.h 44KB
stm32f4xx_rtc.h 40KB
stm32f4xx_adc.h 32KB
stm32f4xx_i2c.h 31KB
stm32f4xx_rcc.h 29KB
stm32f4xx_dma.h 28KB
stm32f4xx_can.h 27KB
stm32f4xx_fsmc.h 27KB
stm32f4xx_sai.h 25KB
stm32f4xx_flash.h 24KB
stm32f4xx_gpio.h 23KB
stm32f4xx_sdio.h 22KB
core_cm4_simd.h 22KB
stm32f4xx_ltdc.h 21KB
stm32f4xx_spi.h 21KB
共 158 条
- 1
- 2
资源评论
- qq_444636982019-08-12不太好用。。
- 锤王马加爵2019-08-04好啊好啊啊
- 程序员-缘2018-11-13好的,真好用
- starsrobot2018-11-19感觉挺好用
- fjj9803202020-11-14试一试可行性,感觉还不错。
钟治国
- 粉丝: 24
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功