[EN] Using the DHT22/DHT11 Temperature and Humidity Sensor Module with ESP8266

This article uses the DHT22 and DHT11 temperature and humidity measurer modules with Python. They are sensor modules that operate using a single signal cable which will save the microcontroller’s port connection. In addition, MicroPython has a library prepared for DHT22 and DHT11 implementation, making it convenient, time-saving and reduce errors that may be caused by manual programming.

There are 3 examples in this article: code17-1 is a normal reading of values, but code17-2 is a loop to read again. By finding the highest and lowest values and display on the LCD module as shown in Figure 8 and example code17-3 showing the average value of temperature and humidity.

Figure 1 Result from code17-1
Read More

[EN] ESP8266 and I2C LCD 16×2

This article writes a library to operate character LCD modules using I2C bus operation, which uses a PCF8574 module designed to connect to the LCD. This makes it possible to use 2 command pins from ESP8266 to command the LCD module’s 8 pins, namely RS, R/W, EN, A, D0, D1, D2 and D3 simultaneously enable/disable the module backlight of LCD and the LCD module character sharpness can be adjusted from the variable resistor located on the PCF8574 module.

(Figure. 1)
Read More

[TH] Using the DHT22/DHT11 Temperature and Humidity Sensor Module with ESP8266

บทความครั้งนี้เป็นการใช้งานโมดูลวัดค่าอุณหภูมิและความชื้น DHT22 และ DHT11 ด้วยภาษาไพธอน ซึ่งเป็นโมดูลเซ็นเซอร์ที่ทำงานด้วยการใช้สายสัญญาณเพียงเส้นเดียว ทำให้ประหยัดพอร์ตของไมโครคอนโทรลเลอร์ในการเชื่อมต่อกับโมดูลเซ็นเซอร์ นอกจากนี้ MicroPython มีไลบรารีเตรียมไว้สำหรับการใช้งาน DHT22 และ DHT11 จึงสะดวกและประหยัดเวลา ลดความผิดพลาดที่อาจจะเกิดจากการเขียนโปรแกรมด้วยตนเอง

ตัวอย่างในบทความนี้มี 3 ตัวอย่าง code17-1 เป็นการอ่านค่ามาแสดงผลแบปกติ แต่ code17-2 เป็นการวนรอบเพื่ออ่านซ้ำ โดยนำค่าที่อ่านมาหาค่าน้อยสุดและต่ำสุด พร้อมทั้งแสดงออกทางโมดูลแอลซีดีดังภาพที่ 8 และตัวอย่าง code17-3 เป็นการแสดงค่าเฉลี่ยของอุณหภูมิและความชื้น

ภาพที่ 1 ผลลัพธ์จาก code17-1
Read More

[TH] ESP8266 and I2C LCD 16×2

บทความนี้เป็นการเขียนไลบรารีเพื่อสั่งงานโมดูลแอลซีดีตัวอักษรโดยใช้การสั่งงานผ่านบัส I2C ซึ่งเลือกใช้โมดูล PCF8574 ที่ออกแบบมาเพื่อเชื่อมต่อกับแอลซีดี ทำให้สามารถใช้ขาสั่งงาน 2 ขาจาก ESP8266 ต่อสั่งงานโมดูลแอลซีดีได้ 8 ขา คือ RS, R/W, EN, A, D0, D1, D2 และ D3 พร้อมทั้งสามารถเปิด/ปิดการใช้แสงส่องหลังโมดูลแอลซีดีและปรับความชัดของตัวอักษรของโมดูลแอลซีดีได้จากตัวต้านทานปรับค่าได้ที่อยู่บนโมดูล PCF8574

ภาพที่ 1
Read More