[EN] Temperature and humidity indicator bar

This article is an example program for cases where you want to display the temperature and humidity bar as shown in Figure 1 with MicroPython and esp32 board with OLED. How to write? The equipment in this experiment used DHT22 as a humidity and temperature measurement device. The board is connected to the I2C bus to communicate with the OLED via pins GPIO4 and GPIO5 for SCL and SDA respectively. At the same time, the signal pin of DHT22 is connected to pin GPIO15 for communication between the sensor and the microcontroller.

(Figure. 1 Example output of temperature and humidity bar display)
Read More

[TH] แถบแสดงค่าอุณหภูมิและความชื้น

บทความนี้เป็นตัวอย่างโปรแกรมสำหรับกรณีที่ต้องการแสดงแถบแสดงค่าอุณหภูมิและความชื้นดังภาพที่ 1 ด้วย MicroPython กับบอร์ด esp32 ที่ติดตั้ง OLED จะเขียนอย่างไร โดยอุปกรณ์ในการทดลองครั้งนี้ใช้ DHT22 เป็นอุปกรณ์วัดความชื้นและอุณหภูมิ โดยบอร์ดเชื่อมต่อกับบัส I2C เพื่อสื่อสารกับ OLED ผ่านทางขา GPIO4 และ GPIO5 สำหรับทำหน้าที่ SCL และ SDA ตามลำดับ พร้อมกันนี้ได้ต่อขาสัญญาณของ DHT22 เข้ากับขา GPIO15 เพื่อใช้สื่อสารกันระหว่างเซ็นเซอร์กับไมโครคอนโทรเลอร์

ภาพที่ 1 ตัวอย่างผลัพธ์ของการแสดงแถบแสดงค่าอุณหภูมิและความชื้น
Read More