登录
首页 » arduino » 超声波模块程序

超声波模块程序

于 2022-12-16 发布 文件大小:2.48 kB
0 127
下载积分: 2 下载次数: 1

代码说明:

arduino超声波模块示例程序 const int TrigPin = 2; const int Echopin = 3;//发射、接收端的引脚 float distance_cm = 0; void setup() {   // put your setup code here, to run once:   Serial.begin(9600);   pinMode(TrigPin,OUTPUT);   pinMode(Echopin,OUTPUT); }   void loop() {   // 产生一个10微秒的高脉冲去触发TrigPin   digitalWrite(TrigPin,LOW);   delayMicroseconds(2);   digitalWrite(TrigPin,HIGH);

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

发表评论

0 个回复

  • ESP12E Motor Shield
    说明:  NodeMcu L293D 电机驱动扩展板,使用方法(Node McuL293D Motor Drive Extension Board, Use Method)
    2020-06-24 14:20:01下载
    积分:1
  • 四足机器人打印件+说明书+代码
    通过8个舵机 实现蜘蛛类的的仿生运动,文件包含所有的打印件及嵌入程序,提供arduino源代码,实现10多种运动模式,可以通过蓝牙或者wifi控制。(The bionic movement of spiders is realized by eight steering gears. The file contains all the prints and embedded programs. It provides Arduino source code and realizes more than 10 motion modes. It can be controlled by Bluetooth or wifi.)
    2020-12-26 10:29:03下载
    积分:1
  • HoodLoader2-master
    Arduino Uno Hood Loader 2 input conversion
    2019-06-18 14:37:16下载
    积分:1
  • 使用ESP8266获取网络标准时间(NPT)并计算出农历
    file name "Wifi_NTP_Time1" from "Udp NTP Client"   Get the time from a Network Time Protocol (NTP) time server   Demonstrates use of UDP sendPacket and ReceivePacket   For more on NTP time servers and the messages needed to communicate with them,  http://www.ntp.org.cn/   当前已提供的各国NTP服务器列表   [INTERNATIONAL NTP server list.]   区域[zone]            域名[Domain]        IP池[IP Pool]   中国[China]           cn.ntp.org.cn     [202.108.6.95] [202.112.29.82] [110.75.190.198]                                        [115.28.122.198] [182.92.12.11] [120.25.108.11]                                        
    2022-05-20 00:13:07下载
    积分:1
  • Gas Leak Detector Using Arduino with SMS AT commands
    燃气泄漏检测仪是一个基于Arduino的项目,它利用GSM技术在燃气泄漏发生时自动向用户发送短信。AT命令用于从gsmshield发送和接收短消息。用户还可以检查气体传感器的状态,然后设备将回复检测到的气体浓度状态。ARDUNO IDE采用纯C/C++语言,本项目只使用软件库和人工AT命令。为了运行设备,您需要有MQ5气体传感器、Arduino或Arduino克隆ATMega328 mcu、GSM屏蔽和L293d蜂鸣器和其他输出设备IC。
    2022-10-30 19:00:03下载
    积分:1
  • arduino单片机控制人体红外感应、超声波测距及控制舵机及卡尔曼滤波的完整程序
    arduino单片机控制人体红外感应、超声波测距及控制舵机及卡尔曼滤波的完整程序
    2022-01-26 03:44:44下载
    积分:1
  • Arduino 蓝牙连接与 bluegiga wt12 芯片
    作为大师使用 arduino 连接蓝牙 wt12 芯片。连接到蓝牙 wt12 RX TX VDD VSS 引脚 arduino。
    2022-12-17 20:05:03下载
    积分:1
  • arduino L298N驱动库
    arduino L298N驱动库,用来驱动电机的库,
    2022-03-22 10:53:55下载
    积分:1
  • arduino上传数据到ONENET云平台
    arduino上传数据到ONENET云平台,arduino通过wifi模块连接到网络,然后再连接onent云平台上传数据,这是通过EDP协议。
    2023-05-20 09:40:02下载
    积分:1
  • 74hc165
    说明:  This is a test program for Arduino connection to 74HC165 shift register
    2019-03-27 07:23:21下载
    积分:1
  • 696518资源总数
  • 105949会员总数
  • 22今日下载