91欧美超碰AV自拍|国产成年人性爱视频免费看|亚洲 日韩 欧美一厂二区入|人人看人人爽人人操aV|丝袜美腿视频一区二区在线看|人人操人人爽人人爱|婷婷五月天超碰|97色色欧美亚州A√|另类A√无码精品一级av|欧美特级日韩特级

電子發(fā)燒友App

硬聲App

掃碼添加小助手

加入工程師交流群

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示
創(chuàng)作
電子發(fā)燒友網(wǎng)>電子資料下載>電子資料>Arduino代碼的DHTxx

Arduino代碼的DHTxx

2023-01-05 | zip | 0.06 MB | 次下載 | 2積分

資料介紹

描述

我需要檢查空調(diào)房的確切溫度,以顯示空調(diào)房與遙控器上顯示的不一樣。所以我決定做這個。

您將需要 x1 面包板(可選)

x1 套電線

x1 dhtxx

x1 Arduino uno

所以連接(從左到右)

引腳 1 至 5v

引腳 2 到數(shù)字引腳 7

引腳 3(留下它)

引腳 4 接地

它將以 C、F、K 和濕度顯示

這里的代碼

謝謝

//Libraries
#include ;
//#include:
//Constants
#define DHTPIN 7     // what pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino
//Variables
int chk;
float hum;  //Stores humidity value
float temp; //Stores temperature value
float faran;
float kel;
void setup()
{
 Serial.begin(9600);
 dht.begin();
}
void loop()
{
   delay(2000);
   //Read data and store it to variables hum and temp
   hum = dht.readHumidity();
   temp= dht.readTemperature();
   //Print temp and humidity values to serial monitor
   Serial.print("Humidity : ");
   Serial.print(hum);
   Serial.println(" %");
   Serial.print("Temp     :");
   Serial.print(temp);
   Serial.println(" Celsius");
   faran = (temp * 9.0) / 5.0 + 32;
   Serial.print("Faranheit: ");
   Serial.print(faran);
   Serial.println(" F");
   kel = temp + 273.15;
   Serial.print("Kelvin: ");
   Serial.print(kel);
   Serial.println(" K");
   Serial.println("");
   Serial.println("");
   delay(5000); //Delay 5 sec
  // This is free and unencumbered software released into the public domain Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OROTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
//For more information, please refer to }

Arduino 面包板
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 11節(jié)電池用電池保護IC S-8261D系列數(shù)據(jù)手冊
  2. 3.07 MB   |  1次下載  |  1 積分
  3. 2PT8P2107 觸控 IO 型 8-Bit MCU規(guī)格書
  4. 3.73 MB   |  次下載  |  免費
  5. 3PT8P2309 觸控 A/D 型 8-Bit MCU規(guī)格書
  6. 4.05 MB   |  次下載  |  免費
  7. 4氮化鎵GaN FET/GaN HEMT 功率驅(qū)動電路選型表
  8. 0.10 MB   |  次下載  |  免費
  9. 5AU-48雙麥多功能語音處理模組規(guī)格書(5)
  10. 2.24 MB  |  次下載  |  免費
  11. 6WX-0813_AI_ENC語音處理模組規(guī)格書
  12. 907.46 KB  |  次下載  |  免費
  13. 7電子管膽機中文資料
  14. 0.03 MB   |  次下載  |  1 積分
  15. 8ESI Allegro XP 大尺寸MLCC測試分選機規(guī)格書
  16. 0.66 MB   |  次下載  |  免費

本月

  1. 1美的電磁爐電路原理圖資料
  2. 4.39 MB   |  20次下載  |  10 積分
  3. 2反激式開關(guān)電源設(shè)計解析
  4. 0.89 MB   |  14次下載  |  5 積分
  5. 3耗盡型MOS FET產(chǎn)品目錄選型表
  6. 0.14 MB   |  3次下載  |  免費
  7. 4簡易光伏控制器原理圖資料
  8. 0.07 MB   |  1次下載  |  5 積分
  9. 5FP7135V060-G1/FP7125替代物料pin to pin
  10. 495.40 KB  |  1次下載  |  免費
  11. 62EDL05x06xx系列 600V半橋門驅(qū)動器帶集成自舉二極管(BSD)手冊
  12. 0.69 MB   |  1次下載  |  免費
  13. 7TI系列-米爾TI AM62L核心板開發(fā)板-高能效低功耗嵌入式平臺
  14. 1.51 MB  |  1次下載  |  免費
  15. 81節(jié)電池用電池保護IC S-8261D系列數(shù)據(jù)手冊
  16. 3.07 MB   |  1次下載  |  1 積分

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935137次下載  |  10 積分
  3. 2開源硬件-PMP21529.1-4 開關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計
  4. 1.48MB  |  420064次下載  |  10 積分
  5. 3Altium DXP2002下載入口
  6. 未知  |  233095次下載  |  10 積分
  7. 4電路仿真軟件multisim 10.0免費下載
  8. 340992  |  191457次下載  |  10 積分
  9. 5十天學(xué)會AVR單片機與C語言視頻教程 下載
  10. 158M  |  183360次下載  |  10 積分
  11. 6labview8.5下載
  12. 未知  |  81605次下載  |  10 積分
  13. 7Keil工具MDK-Arm免費下載
  14. 0.02 MB  |  73831次下載  |  10 積分
  15. 8LabVIEW 8.6下載
  16. 未知  |  65991次下載  |  10 積分