This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS:具有速度测试功能的 HC-SR04传感器

Guru**** 2193080 points
Other Parts Discussed in Thread: MSP430G2553
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/867388/ccs-hc-sr04-sensor-with-speed-test

主题中讨论的其他器件:MSP430G2553

工具/软件:Code Composer Studio

我使用 msp430g2553.i 使用 code composer studio 9.2.0。 我想 İ 一个确定物体速度的代码。我们知道道路的距离、并且希望使用定时器和中断2个传感器(HC-SR04)来获得时间。一个传感器将从道路的起点开始、第二个传感器将在道路的末端。想知道吗 两个传感器之间的时间。我想 İ 一个电路来计算两个点之间的物体速度。İ 希望使用2个 HC-SR04传感器。我如何编写代码?需要帮助。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    您可以将代码分为3个部分。

    系统初始化、包括时钟、定时器、GPIO 等

    用于控制 HC-SR04的时间计算

    3.速度计算,使用所有数据计算 物体速度。

    伊斯天