当前位置: 首页 > news >正文

无锡市建设银行总行网站小程序公司排名

无锡市建设银行总行网站,小程序公司排名,微信手机网站制作,保网Arduino示例代码讲解:Ping Ping功能概述硬件部分:软件部分:代码逐行解释定义常量`setup()` 函数`loop()` 函数`microsecondsToInches()` 函数`microsecondsToCentimeters()` 函数工作原理Ping 这段代码是一个Arduino示例程序,用于读取Parallax PING)))超声波测距传感器的数…

Arduino示例代码讲解:Ping

  • Ping
    • 功能概述
        • 硬件部分:
        • 软件部分:
    • 代码逐行解释
        • 定义常量
        • `setup()` 函数
        • `loop()` 函数
        • `microsecondsToInches()` 函数
        • `microsecondsToCentimeters()` 函数
    • 工作原理

Ping

这段代码是一个Arduino示例程序,用于读取Parallax PING)))超声波测距传感器的数据,并计算出距离最近物体的距离。它将距离值通过串行通信发送到计算机,适用于需要测量距离的场景。

/* Ping))) SensorThis sketch reads a PING))) ultrasonic rangefinder and returns thedistance to the closest object in range. To do this, it sends a pulseto the sensor to initiate a reading, then listens for a pulseto return.  The length of the returning pulse is proportional tothe distance of the object from the sensor.The circuit:* +V connection of the PING))) attached to +5V* GND connection of the PING))) attached to ground* SIG connection of the PING))) attached to digital pin 7http://www.arduino.cc/en/Tutorial/Pingcreated 3 Nov 2008by David A. Mellismodified 30 Aug 2011by Tom IgoeThis example code is in the public domain.*/// this constant won't change.  It's the pin number
// of the sensor's output:
const int pingPin = 7;void setup() {// initialize serial communication:Serial.begin(9600);
}void loop()
{// establish variables for duration of the ping,// and the distance result in inches and centimeters:long duration, inches, cm;// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:pinMode(pingPin, OUTPUT);digitalWrite(pingPin, LOW);delayMicroseconds(2);digitalWrite(pingPin, HIGH);delayMicroseconds(5);digitalWrite
http://www.dtcms.com/a/560459.html

相关文章:

  • asp.net 移动网站开发网站开发首选畅扬科技
  • 在线男人和女人做那件事网站电子商务网站开发与设计
  • 建设银行临江市支行网站开发公司需要什么资质
  • 韩国唯美网站设计腾讯邮箱网页版登录入口
  • 网站建设对企业发展的意义网站建设帮助中心
  • 手机搭建本地网站metro 导航网站
  • 重庆建网站cqiezscom淘宝wordpress cms主题
  • 网站建设和考核工作通知百度运营培训班
  • 东海县建网站字节跳动直播开放平台
  • 镇海网站建设常平网站公司
  • 做网站的空间费用要多少WordPress设置腾讯企业邮箱
  • 宣传海报怎么制作河南网站关键词优化代理
  • 郑州网站制作公司名单怎么制作公众号教程
  • 商城手机网站开发本地集团网站建设
  • 网站备案ip地址上海医疗网站备案
  • 专业的led网站建设广西南宁官方网站企业
  • 网站没有备案怎么做支付网站如何做IPV6支持
  • 想开发一个旧物交易网站应该怎么做沈阳设计网站
  • 千图素材网站5 个不同类型的网站
  • 做外贸网站义乌在线手机动画网站模板
  • 网站文章关键字密度新加坡服务器网站需要备案么
  • 怎么查网站icp备案个体户可以做开发网站业务嘛
  • 做百度推广网站得多少钱聊城集团网站建设费用
  • 欧美平面设计网站网站建设宣传素材
  • 选择合肥网站建设wordpress小程序百家号
  • 南京网站搭建公司微信网站如何制作软件
  • 河南网站建设服务公司seowhy问答
  • 电商网站建设如何23456网址大全
  • 科技馆优化是企业通过网站来做吗
  • 成都彩票网站开发怎么在百度打广告