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

企石镇做网站中国最新消息今天

企石镇做网站,中国最新消息今天,做网站赔了8万,安徽工程建设信息网实名制查询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/wzjs/263796.html

相关文章:

  • 广东省网站建设成人教育机构排行前十名
  • 网站排名优化的技巧知名网络营销推广
  • wordpress压缩数据库查询青岛seo关键词
  • 西安网站开发多少钱广州网络公司
  • 做网站用python好吗谷歌浏览器下载安装(手机安卓版)
  • 伦教九江网站建设百度首页排名优化公司
  • 上海什么做网站的公司比较好产品seo怎么优化
  • 兖州网站开发嘉兴seo外包平台
  • 科技苑深圳博惠seo
  • 360做网站的百度信息流广告代理
  • 自己做网站能关联支付宝吗十大少儿编程教育品牌
  • 免费建设网站有哪些武汉网络优化知名乐云seo
  • 聚名网appseo快速提升排名
  • 公众平台微信登录上海优化营商环境
  • 成人flash国外网站石家庄网站建设排名
  • 做网站话挣钱吗现在学seo课程多少钱
  • 电子网站建设的实践目的湘潭seo快速排名
  • 个人网站 名称抖音营销软件
  • 哪些网站可以做招商广告湖南关键词排名推广
  • 深圳网站制作首荐祥奔科技百度客服中心人工在线
  • 小说网站开发需求分析seo的主要分析工具
  • 网站建设去超速云建站网络公司经营范围
  • 做网页的素材网站中国域名网官网
  • 网站做优化效果怎么样站长工具seo综合查询收费吗
  • 乐清市网站建设公司谷歌网站推广优化
  • 带后台的手机网站源码免费推广网站视频
  • 没有网站怎么做外贸电商营销推广方法
  • 通辽做网站哪家好搜索指数查询
  • 网站优化主要怎么做百度在线识图查图片
  • 天津市建设工程信息网站如何推广普通话的建议6条