echo//TIM4_CH2(PB7)->trigGPIO_InitTypeDefGPIO_InitStructure;EXTI_InitTypeDefEXTI_InitStructure;//NVIC_InitTypeDefNVIC_InitStructure;RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);GPIO_InitStructure.GPIO_Pin=GPIO_Pin_7;GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;GPIO_Init(GPIOB,&GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin=GPIO_Pin_6;GP-IMDN开发者社群-imdn.cn"> echo//TIM4_CH2(PB7)->trigGPIO_InitTypeDefGPIO_InitStructure;EXTI_InitTypeDefEXTI_InitStructure;//NVIC_InitTypeDefNVIC_InitStructure;RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);GPIO_InitStructure.GPIO_Pin=GPIO_Pin_7;GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;GPIO_Init(GPIOB,&GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin=GPIO_Pin_6;GP - IMDN开发者社群-imdn.cn">
登录
首页 » c » 光流,超声波

光流,超声波

于 2022-01-25 发布 文件大小:4.62 MB
0 222
下载积分: 2 下载次数: 1

代码说明:

可以给做电赛的朋友 #include "includes.h" /********************************* 使用外部中断和systik定时器来做超声波部分 警告:超声波使用systick时,其他设备不允许使用systick ***********************************/ unsigned char ultrasonic_systick = 0;//等于0时,超声波没有使用SYSTICK unsigned char ultrasonic_ok = 0; unsigned int ultrasonic_Data; float ultrasonic_Hight; //此部分初始化外部中断以及各部分用到的引脚 void ultrasonic_Init(void) { //使用TIM4_CH1,TIM4_CH2用于超声波引脚 //TIM4_CH1(PB6) -> echo //TIM4_CH2(PB7) -> trig GPIO_InitTypeDef GPIO_InitStructure; EXTI_InitTypeDef EXTI_InitStructure; // NVIC_InitTypeDef NVIC_InitStructure; RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB ,ENABLE); GPIO_InitStructure.GPIO_Pin=GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP; GPIO_Init(GPIOB,&GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin=GPIO_Pin_6; GP

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Level
    水准网高程平差,C#语言,可以进行水准网的完整平差程序(Leveling adjustment of leveling network)
    2017-11-10 20:14:59下载
    积分:1
  • PC端摄像头扫描二维码程序
    PC端二维码扫描程序调用AForge.Video打开摄像头,采用ZXING动态链接库实现二维码扫描,模仿手机扫描二维码,在摄像头画面中显示扫描红线,扫描成功显示二维码编码字符,并发出“滴”的声音。
    2022-03-30 02:30:22下载
    积分:1
  • 2052Player
    说明:  由于不满意语音芯片的复制性差,于是自己做了一个语言模块,用STC12LE2052单片机的PWM功能播放声音,从Wave文件中提取的声音数据通过串口从计算机下载,存储在串行Flash芯片SST25VF016B中,可进行单段播放和循环播放,单个模块的制作成本应该在30元以下,可以播8K8位的声音256秒。(Not satisfied with the voice chip, as a result of poor copy, so do a language module, with the STC' s 2052 single-chip PWM function to play a sound, from the Wave files to extract the audio data downloaded from the computer through the serial port, is stored in the Serial Flash chip, can play single player and recycling, the production costs of a single module should be below 30, you can broadcast the voice of 8K8-bit 256 seconds.)
    2009-07-29 11:24:11下载
    积分:1
  • 1601
    说明:  C51系列,用C语言编写,驱动1601液晶显示器(C51 series, with the C language, driving liquid crystal display 1601)
    2011-03-16 17:14:03下载
    积分:1
  • RemoteStartup
    说明:  远程开机的程序,有mfc,vc++,非常实用(Remote boot-consuming procedures, mfc, vc++, Very useful)
    2008-11-21 11:04:54下载
    积分:1
  • C8051F020开发应用程序,完成人机界面及IO的输入输出,包含8路AD模拟输入和2路DA输出,还有PWM驱动电机的控制。...
    C8051F020开发应用程序,完成人机界面及IO的输入输出,包含8路AD模拟输入和2路DA输出,还有PWM驱动电机的控制。-C8051F020 development and application procedures, man-machine interface and complete IO input and output, AD contains eight analog input and two output DA Road, PWM motor drive control.
    2022-01-24 18:47:05下载
    积分:1
  • AAC编解码器
    采用C++实现AAC音频信息的编解码,能工正确编译并将MP3格式音频编码成为AAC格式,同时能解码AAC格式音频,实现编码和解码两个功能,值得做相关领域研究的同学作为参考。
    2022-02-02 10:15:51下载
    积分:1
  • mips-code-to-machine-code
    汇编代码转成机器码——对输入有几点要求:指令是小写;一行只能有一条指令;每行开头不能有空格,必须一上来就是操作符,后面可以有空格;立即数只处理十进制数;输入-1代表程序结束(Turn assembly code into machine code- there are several points of entry requirements: command is lowercase line can only have one instruction beginning of each line can not have spaces, the operator must be up against the back can have spaces immediate treatment only decimal number -1 means the end of the input program)
    2014-07-29 13:42:12下载
    积分:1
  • stc8051 usart 中断
    STC8051芯片
    2022-05-25 00:27:53下载
    积分:1
  • PWM控制舵机
    stm32f103c8t6 控制 SG90舵机(stm32f103c8t6 SG90)
    2019-04-22 19:38:17下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载