[EN] The dCore-espWST

This article recommends using the esp8266 to read temperature and humidity from the DHT11 sensor, the voltage from the LDR sensor, received from the switch, and display via OLED with MicroPython’s Python language, this feature is the dCore-espWST board we are using (Which in the previous article we used the dCore-esp32WST with the same design, but using esp32, but the program code can still be used with the model board) and is a board for use in teaching IoT subjects. The prototype structure of the board is as shown in Figure 1, which is normally used with a battery power supply unit with a solar panel charging circuit.

(Figure. 1 dCore-espWSTprototype)
Read More

[EN] The MicroPython Internal File System.

This article is an implementation of the MicroPython file system using the esp8266 and esp32 microcontroller boards as an experimental board. The file system usage involves directories and files including connecting the device to be seen as a MicroPython file system, for example, connecting to an SD-Card to see it as a system directory, etc. It uses the os class to create, open, access, write data and disable files which will be part of MicroPython’s file class.

Read More

[EN] ESP8266/ESP32 WiFi

The ESP8266 and ESP32 boards are equipped with built-in WiFi connectivity. They can work in both self-application mode (Access Point) and client mode connected to an existing WiFi network or STA. Developers can set the device name (ESSID) or use the default name from the system as MicroPython-xxxx, where x represents the MAC Address of the device, the password is micropythoN (developers can assign new) and the IP Address (IP Address) is 192.168.4.1.

(Figure. Our ESP8266+Uno)
Read More

[EN] Display time from NTP and TimeLib with esp8266

This article is an example of using the Arduino framework’s NTP and TimeLib libraries with either the ESP-01s (Figure 1) or esp8266 to report the current time via the web served by the esp8266, which in this example is called NTPClient and TimeLib libraries. An Internet connection is required to read the date and time from an NTP provider such as time.nist.gov.

(Figure. 1 ESP-01s on dCore-0 v.0.7)
Read More

[EN] DHT11 Web Report

This article is an application of Python programming for Micropython used with esp8266 or esp32 attached to DHT11 for temperature and humidity storage. The last 10 temperature results collected every 5 seconds are reported as shown in Figure 1.

(Figure. 1 Result from report)
Read More

[EN] u8g2 Library

From the article on using the ESP8266 with an OLED graphical display written in Python, you’ll find that it’s fast and easy but when used with other microcontrollers that cannot use Micropython or CircuitPython, what must be done? One of the many options is the u8glib or u8g2 (Universal 8 bit Graphics Library) libraries, designed to work with monochromatic 8-bit graphics over either I2C or SPI communication. In this article, we are using I2C OLED as shown in Figure 1.

(Figure. 1 STM32F401CCU6 with I2C OLED)
Read More

[EN] ESP Class

This article is a detailed look at the ESP.h file of esp8266 Arduino to learn the functions that are very useful for programming to control the operation of this microcontroller such as knowing the amount of memory remaining or the largest memory size that can be reserved. This is used if you want to write a program that uses dynamic memory to store a list of all found APs, for example, programmers can use this class directly from the ESP object.

Read More

[TH] How to render the Thai string correctly?

จากบทความการใช้งาน u8g2 ที่สามารถเรนเดอร์ (Render) ภาษาไทย (Thai string) ได้ผ่านทางฟังก์ชัน drawUTF8() ของไลบรารี u8g2 แต่การแสดงผลไม่ถูกต้อง ดังภาพที่ 1 ด้วยเหตุนี้จึงต้องปรับปรุงโค้ดของไลบรารีเพิ่มเติมเพื่อให้การแสดงผลถูกต้องดังภาพที่ 2

ภาพที่ 1 การแสดงผลของ drawUTF8() ก่อนปรับปรุง
ภาพที่ 2 การแสดงผลของ drawUTF8() หลังปรับปรุง
Read More