การติดตั้ง Library ของ DHT Sensor
ไลบรารี DHT ใช้สำหรับในการให้เซ็นเซอร์ DHT อ่านอุณหภูมิและความชื้นด้วย Arduino หรือ ESP8266 ได้
คลิกที่นี่เพื่อดาวน์โหลดไลบรารี ของเซ็นเซอร์ DHT
https://github.com/adafruit/DHT-sensor-library
เปิดโปรแกรม Arduino IDE

ไปที่ Skecth -> Include Library -> Add .ZIP Library...

ไปที่ ไลบรารี DHT-sensor-library ที่เรา ดาวน์โหลด มา

ตรวจสอบที่ Skecth -> Include Library จะพบ ไลบรารี DHT sensor library เพิ่มเข้ามาใน Arduino IDE ของเรา

ไปที่ Skecth -> Include Library -> Manage Libraries...

ไปที่ช่องค้นหา พิมพ์ DHT -> Enter (เพื่อค้นหา DHT sensor library )

เมื่อพบ DHT sensor library แล้ว ให้คลิก More info

คลิกที่ Select Vers..

ในตัวอย่าง เลือก Version 1.2.3

คลิก Install

คลิก Close

เพิ่ม #include <DHT.h> ไปที่ส่วนบนสุดของโค้ด
#include <DHT.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
ไปที่ Tools -> Board -> Arduino/Genuino UNO

คลิกที่เครื่องหมายถูก เพื่อทดลอง คอมไพล์

ถ้าขึ้น Done compiling.
แสดงว่า Arduino IDE ของเรา ติดตั้ง ไลบรารี DHT สําเร็จแล้ว
แสดงว่า Arduino IDE ของเรา ติดตั้ง ไลบรารี DHT สําเร็จแล้ว
