DHT11 และ DHT22 คือเซนเซอร์วัดความชื้นและอุณหภูมิในอากาศ สามารถนำไปประยุกต์ใช้งานได้หลากหลาย เช่น ตู้ฟักไข่ โรงเรือนปลูกผัก โรงเพาะเห็ด เป็นต้น นำไปใช้งานได้ง่าย รองรับแรงดันไฟฟ้า 3.3 และ 5V DHT11
DHT22
เอกสารเพิ่มเติม
Library ที่ใช้งาน
ตัวอย่างที่ 1 รายการอุปกรณ์
วิธีการต่อใช้งาน DHT22 AM2302 > Arduino UNO R3
***หากเป็นตัวธรรมดาให้ต่อความต้านทาน 10K Ohm ระหว่าง ขา 5V และ data LED1 > Arduino UNO R3
LED2 > Arduino UNO R3
ตัวอย่างการใช้งาน 1.เปิด Serial monitor 2.เมื่อเซนเซอร์วัดค่าอุณหภูมิได้ 30 องศา หรือมากกว่า 30 องศา LED สีส้มสว่าง 3.เมื่อเซนเซอร์วัดค่าอุณหภูมิได้น้อยกว่า 30 องศา LED สีน้ำเงินสว่าง to adapt to a wider voltage range, the voltage range: 3.0 ~ 5.5V, parasitic power mode can be powered by the data line
DS18B20 shape and internal structure DS18B20 internal structure is mainly composed of four parts: 64-bit lithography ROM, temperature sensor, non-volatile temperature alarm trigger TH and TL, configuration register. The outline and pinout of the DS18B20 are shown in the following figure |