[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-720434-105":59,"doc-detail-720434-en":130,"doc-similar-720434":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","dht11-dht22-and-am2302-sensors-overview","DHT11, DHT22 and AM2302 Sensors - Overview","","Tutorial介绍DHT11、DHT22与AM2302温湿度传感器的基础特性与接线方法，说明其由电容式湿度传感器与热敏电阻构成，并通过微控制器读取数字信号。内容对比DHT11与DHT22（含供电范围、测量精度、取样频率与尺寸），给出与面包板/原型板的连接步骤、VCC与数据脚电阻上拉建议，并演示使用Arduino安装Adafruit DHT库与DHTtester示例以获得温度与湿度读数。",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/dht11-dht22-and-am2302-sensors-overview/720434/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/dht11-dht22-and-am2302-sensors-overview/720434.png","ImageObject",300,407,{"name":92,"@type":93},"Helloiii","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-24","2026-11-18",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"DHT11和DHT22的主要差异是什么？","Question",{"text":112,"@type":113},"两者外观相近且引脚排列类似，但精度范围、温湿度测量区间以及取样频率不同。DHT22通常更准确、覆盖更宽范围，且取样频率更低（最多每2秒一次）。","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"将DHT传感器连接到主控时需要注意哪些引脚？",{"text":117,"@type":113},"DHT传感器通常有4个引脚：VCC接3.3–5V电源，Data输出接数据引脚，Ground接地，Pin 3不使用应忽略。建议在VCC与数据脚之间加入约10kΩ的上拉电阻。",{"name":119,"@type":110,"acceptedAnswer":120},"如何在Arduino中安装并使用DHT传感器的示例程序？",{"text":121,"@type":113},"在Arduino Library Manager中安装Adafruit的DHT sensor library，并确保（当DHT库版本为1.3.0及以上）同时安装Adafruit Unified Sensor library。然后打开Examples→DHT→DHTtester，若使用DHT11则相应注释/取消注释DHTTYPE定义并上传程序，即可读取温度和湿度。","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},720434,1795037368,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":19,"preview_urls":145},5909897196768,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","DHT11, DHT22 and AM2302 Sensors  \nCreated by lady ada  \n[https://learn.adafruit.com/dht](https://learn.adafruit.com/dht)  \nLast updated on 2026-04-15 09:32:38 PM UTC  \n©Adafruit Industries Page 1 of 14  \nTable of Contents  \nOverview 3  \n• DHT11 vs DHT22  \nConnecting to a DHTxx Sensor 4 Using a DHTxx Sensor with Arduino 6 DHT CircuitPython Code 9 • Adafruit CircuitPython Module Install  \n• Wiring  \n• Usage  \n• Example Code  \nPython Docs 13 Downloads 13 • Simulator  \n©Adafruit Industries Page 2 of 14  \nOverview  \nThis tutorial covers the low cost DHT temperature & humidity sensors ([https://](https://)[ ](https://)[adafru.it/aJU](adafru.it/aJU)). These sensors are very basic and slow, but are great for hobbyists who want to do some basic data logging. The DHT sensors are made of two parts, a capacitive humidity sensor and a thermistor ([https://adafru.it/aHD](https://adafru.it/aHD)). There is also avery basic chip inside that does some analog to digital conversion and spits out a digital signal with the temperature and humidity. The digital signal is fairly easy to read using any microcontroller.  \nDHT11 vs DHT22  \nWe have two versions of the DHT sensor, they look a bit similar and have the same pinout, but have different characteristics. Here are the specs:  \nDHT11 ([http://adafru.it/386](http://adafru.it/386))  \n• Ultra low cost  \n• 3 to 5V power and I/O  \n• 2.5mA max current use during conversion (while requesting data)  \n• Good for 20-80% humidity readings with 5% accuracy  \n• Good for 0-50°C temperature readings ±2°C accuracy  \n• No more than 1 Hz sampling rate (once every second)  \n©Adafruit Industries Page 3 of 14  \n• Body size 15.5mm x 12mm x 5.5mm  \n• 4 pins with 0.1\" spacing  \nDHT22  ([http://adafru.it/385)](http://adafru.it/385)/ AM2302 ()[/](http://adafru.it/385)/ AM2302 ()[ ](http://adafru.it/385)/ AM2302 ()[AM2302](http://adafru.it/385)/ AM2302 ()[ (](http://adafru.it/385)/ AM2302 ()[http://adafru.it/393](http://adafru.it/393)) (Wired version)  \n• Low cost  \n• 3 to 5V power and I/O  \n• 2.5mA max current use during conversion (while requesting data)  \n• Good for 0-100% humidity readings with 2-5% accuracy  \n• Good for-40 to 80°C temperature readings ±0.5°C accuracy  \n• No more than 0.5 Hz sampling rate (once every 2 seconds)  \n• Body size 15.1mm x 25mm x 7.7mm  \n• 4 pins with 0.1\" spacing  \nAs you can see, the DHT22 ([http://adafru.it/385)](http://adafru.it/385) / AM2302 ()[ /](http://adafru.it/385) / AM2302 ()[ ](http://adafru.it/385) / AM2302 ()[AM2302](http://adafru.it/385) / AM2302 ()[ (](http://adafru.it/385) / AM2302 ()[http://adafru.it/393](http://adafru.it/393)) is a  \nlittle more accurate and good over a slightly larger range. Both use a single digital pin and are 'sluggish' in that you can't query them more than once every second or two.  \nYou can pick up both the DHT11 ([http://adafru.it/386](http://adafru.it/386)) and DHT22 ([http://adafru.it/](http://adafru.it/)  \n385) or AM2302 ([http://adafru.it/393](http://adafru.it/393)) from the adafruit shop!  \nConnecting to a DHTxx Sensor  \nLuckily it is trivial to connect to these sensors, they have fairly long 0.1\"-pitch pins so you can plug them into any breadboard, perfboard or similar.  \n©Adafruit Industries Page 4 of 14  \nAM2302 (wired DHT22) temperaturehumidity sensor  \nDiscontinued-you can grab AM2301BWired Enclosed AHT20-Temperature and Humidity Sensor instead!The...  \n[https://www.adafruit.com/product/393](https://www.adafruit.com/product/393)  \nLikewise, it is fairly easy to connect up to the DHT sensors. They have four pins  \n1. VCC- red wire Connect to 3.3-5V power. Sometime 3.3V power isn't enough in which case try 5V power.  \n2. Data out-white or yellow wire  \n3. Not connected  \n4. Ground-black wire  \nSimply ignore pin 3, it's not used. You will want to place a 10 Kohm resistor between VCC and the data pin, to act as a medium-strength pull up on the data line. The Arduino has built in pullups you can turn on but they're very weak, about 20-50K  \n©A","cbCaipkiMv98tuCk","https://ap.wps.com/l/cbCaipkiMv98tuCk","pdf",899671,14,"English","# Overview\n## DHT11 vs DHT22\n# Connecting to a DHTxx Sensor\n## Using a DHTxx Sensor with Arduino\n# DHT CircuitPython Code","[{\"question\":\"DHT11和DHT22的主要差异是什么？\",\"answer\":\"两者外观相近且引脚排列类似，但精度范围、温湿度测量区间以及取样频率不同。DHT22通常更准确、覆盖更宽范围，且取样频率更低（最多每2秒一次）。\"},{\"question\":\"将DHT传感器连接到主控时需要注意哪些引脚？\",\"answer\":\"DHT传感器通常有4个引脚：VCC接3.3–5V电源，Data输出接数据引脚，Ground接地，Pin 3不使用应忽略。建议在VCC与数据脚之间加入约10kΩ的上拉电阻。\"},{\"question\":\"如何在Arduino中安装并使用DHT传感器的示例程序？\",\"answer\":\"在Arduino Library Manager中安装Adafruit的DHT sensor library，并确保（当DHT库版本为1.3.0及以上）同时安装Adafruit Unified Sensor library。然后打开Examples→DHT→DHTtester，若使用DHT11则相应注释/取消注释DHTTYPE定义并上传程序，即可读取温度和湿度。\"}]","DHT11, DHT22 and AM2302 Sensors - Overview | PDF",35,[146,150,154,158],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/e0ce1460a192c03cd2abe2119bb26e8c.webp",983,1390,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/24792f6f0f9bb806bed6dfc712c1d89b.webp",982,1388,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/7c186490120b08c81460c90a75e829e0.webp",981,1387,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/a484227d660a48a4c40a96045812b2b9.webp",980,1385,{"list":163,"token":66},[164,170,176,182,188,194,201,208,214,220],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":81,"category_name":30,"create_tm":169},720440,"DHT11 Temperature and Humidity Sensor - Specification - Connecting Diagram - Sample Code","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024396067/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=AMU9OfYJl7Jt1y3pt8p5H%2F2Uw5M%3D","dht11-temperature-and-humidity-sensor-specification-connecting-diagram-sample-code",1795037377,{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":19,"category_name":30,"create_tm":175},720477,"Adafruit BMP280 Barometric Pressure + Temperature Sensor Breakout","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024396857/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=5DuQsUNIEt7wTPnz%2FmlCfu5ILSI%3D","adafruit-bmp280-barometric-pressure-temperature-sensor-breakout",1795037493,{"doc_id":177,"doc_title":178,"file_type":137,"home_preview_img_url":179,"slug":180,"view_count":52,"category_name":30,"create_tm":181},700445,"Adafruit BME680 - Humidity, Temperature, Barometric Pressure and VOC Gas Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012025805/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=hE5udes7nQk4a%2Beiw5PMKch5vSU%3D","adafruit-bme680-humidity-temperature-barometric-pressure-and-voc-gas-guide",1794518765,{"doc_id":183,"doc_title":184,"file_type":137,"home_preview_img_url":185,"slug":186,"view_count":81,"category_name":30,"create_tm":187},720486,"INA219 Zerø-Drift, Bidirectional Current/Power Monitor With I2C Interface - datasheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024396978/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=VF3OrtdQkLxII2apMAiN5QLaac0%3D","ina219-zero-drift-bidirectional-currentpower-monitor-with-i2c-interface-datasheet",1795037516,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":19,"category_name":30,"create_tm":193},720207,"ATMEGA328P-AU - Datasheet - Key Features","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024388152/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=y46kR1wjOgWUt4PMJZPXScZX3fo%3D","atmega328p-au-datasheet-key-features",1795035422,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":199,"category_name":30,"create_tm":200},560299,"JCS24N50H - Datasheet - 24A, 500V MOSFET关键参数与额定值","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947613491/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=71HFz9RSILVwtKilzd%2FrJfx7NXw%3D","jcs24n50h-datasheet-24a-500v-mosfet-key-parameters-and-ratings",18,1791802651,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":206,"category_name":30,"create_tm":207},562386,"数字万用表套件 - 型号DT9205A - 装配指导说明书","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947678389/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=iGpcOjrl%2B%2BbjeO9jYzKHjQKEZjA%3D","digital-multimeter-kit-model-dt9205a-assembly-guide",47,1791808503,{"doc_id":209,"doc_title":210,"file_type":137,"home_preview_img_url":211,"slug":212,"view_count":52,"category_name":30,"create_tm":213},563005,"STK-056 - 20W AF功率放大器技术规格书","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947898112/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=cOzCLevksQMTXVxvxhNzER6N%2BFg%3D","stk-056-20w-af-power-amplifier-technical-specifications",1791810311,{"doc_id":215,"doc_title":216,"file_type":137,"home_preview_img_url":217,"slug":218,"view_count":52,"category_name":30,"create_tm":219},700171,"selec - PRODUCT CATALOG - 4 Temperature Controllers - 4 Counters - 4 Process Indicators - 4 Protection Relays - 4 Meters - 4 Timers - 4 PLCs","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012013965/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=i15tlrvtvxREO%2BznKIX8xhUdH3Q%3D","selec-product-catalog-4-temperature-controllers-4-counters-4-process-indicators-4-protection-relays-4-meters-4-timers-4-plcs",1794516392,{"doc_id":221,"doc_title":222,"file_type":137,"home_preview_img_url":223,"slug":224,"view_count":199,"category_name":30,"create_tm":225},563075,"REF50xx-EP - Low-Noise, Very Low Drift, Precision Voltage Reference - Features - Applications - Description","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947849469/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110139&Signature=RHN8tzy6i%2F7rT7UBG6x3TBlGWkQ%3D","ref50xx-ep-low-noise-very-low-drift-precision-voltage-reference-features-applications-description",1791810470]