欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: US-015超聲波測距資料(含Arduino與單片機源碼,電路圖等) [打印本頁]

作者: hxy1210903246    時間: 2018-5-16 13:20
標題: US-015超聲波測距資料(含Arduino與單片機源碼,電路圖等)
US-015使用說明書及例程-V2.0+SA-260

US-015是US-020模塊的升級版本,和US-020兼容,以前US-020的測試程序US-015也適用。
US-015超聲波測距模塊例程與US-020的測試例程相同。

文件夾“US_015_GPIO_HighPrecision_ino”是用Arduino進行控制的高精度測距版本。




文件夾中的pde文件為Arduino的工程文件,可通過記事本打開和編輯。

US-015_GPIO_Arduino源程序如下:
  1. unsigned int EchoPin = 2;           // connect Pin 2(Arduino digital io) to Echo at US-015
  2. unsigned int TrigPin = 3;           // connect Pin 3(Arduino digital io) to Trig at US-015
  3. unsigned long Time_Echo_us = 0;
  4. unsigned long Len_mm  = 0;
  5. void setup()
  6. {  //Initialize
  7.     Serial.begin(9600);                        //Serial: output result to Serial monitor
  8.     pinMode(EchoPin, INPUT);                    //Set EchoPin as input, to receive measure result from US-015
  9.     pinMode(TrigPin, OUTPUT);                   //Set TrigPin as output, used to send high pusle to trig measurement (>10us)
  10. }

  11. void loop()
  12. {
  13.     digitalWrite(TrigPin, HIGH);              //begin to send a high pulse, then US-015 begin to measure the distance
  14.     delayMicroseconds(20);                    //set this high pulse width as 20us (>10us)
  15.     digitalWrite(TrigPin, LOW);               //end this high pulse
  16.    
  17.     Time_Echo_us = pulseIn(EchoPin, HIGH);               //calculate the pulse width at EchoPin,
  18.     if((Time_Echo_us < 60000) && (Time_Echo_us > 1))     //a valid pulse width should be between (1, 60000).
  19.     {
  20.       Len_mm = (Time_Echo_us*34/100)/2;      //calculate the distance by pulse width, Len_mm = (Time_Echo_us * 0.34mm/us) / 2 (mm)
  21.       Serial.print("Present Distance is: ");  //output result to Serial monitor
  22.       Serial.print(Len_mm, DEC);            //output result to Serial monitor
  23.       Serial.println("mm");                 //output result to Serial monitor
  24.     }
  25.     delay(1000);                            //take a measurement every second (1000ms)
  26. }

復制代碼

所有資料51hei提供下載:
US-015使用說明書及例程-V2.0 SA-260.rar (2.21 MB, 下載次數: 99)




作者: 張琪11    時間: 2019-5-23 17:20
請問一下超聲波傳感器HC-SR04和超聲波傳感器US-015程序上的區別大嗎
作者: eagler8    時間: 2019-9-21 16:11
張琪11 發表于 2019-5-23 17:20
請問一下超聲波傳感器HC-SR04和超聲波傳感器US-015程序上的區別大嗎

接口與功能基本一致,使用芯片不同,測量精度等有小差別
作者: fengbangwei    時間: 2020-1-6 16:23
eagler8 發表于 2019-9-21 16:11
接口與功能基本一致,使用芯片不同,測量精度等有小差別

US-015程序芯片是什么型號,
作者: eagler8    時間: 2020-1-20 11:41
fengbangwei 發表于 2020-1-6 16:23
US-015程序芯片是什么型號,

當時做實驗時也沒有查到芯片型號,好像這款分立元件比較多
作者: eagler8    時間: 2020-1-20 11:41


作者: yuri_su    時間: 2020-11-24 16:15
我以為有us015原理圖,這個是賣家的資料吧




歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1