[TH] LittleFS Filesystem

บทความกล่าวถึงการใช้ไลบรารี LittleFS และแนะนำไลบรารีที่ถูกพัฒนาเพื่อใช้กับไมโครคอนโทรเลอร์ esp32 ซึ่งมีส่วนเสริม (plugin) ของ Arduino IDE สำหรับอัพโหลดไฟล์ไปเก็บในรอมของไมโครคอนโทรลเลอร์ ทำให้สะดวกต่อการโหลดข้อมูลไปเก็บและเรียกใช้งาน ด้วยเหตุนี้ถ้าผู้เขียนโปรแกรมรู้สึกยุ่งยากกับการแปลงโค้ด HTML/CSS/JavaScript ให้เป็นสตริงด้วยตนเอง และเปลี่ยนมาเป็นอัพโหลดไฟล์ไปเก็บใน esp32 แล้วอ่านไฟล์เว็บมาใช้งานโดยตรงจะเป็นสิ่งที่จะต้องฝึกฝนใช้งานเจ้า LittleFS ไว้เป็นไลบรารีคู่ใจกันเลยทีเดียว


Read More

[EN] random

Random numbers in Python use the random class, but microcontrollers don’t support as much randomness as in computer systems, so Micropython supports different commands depending on the chip type. This article discusses how to use random with esp8266 and esp32 microcontrollers, which are instructed to just generate random numbers and configure the random seed as follows.

Read More

[EN] machine.RTC

This article takes a detailed look at the Micropython machine.RTC class. The main function of this class is designed to be an RTC (Real-Time Clock) inside the microcontroller for storing date and time. It is more convenient when used with ESP8266 or ESP32 chip because NTP can be accessed to read the date and time from the internet and then store the value into the RTC to enable the accuracy and do not require frequent internet access to read the values ​​again. This saves the use of external RTC circuits as well.

Read More

[EN] Arduino : DHT Sensor

This article describes how Adafruit’s DHT Sensor library is compatible with all Arduino-compatible architectures, making it easier to deploy DHT sensors for humidity and temperature readings across multiple platforms. This article has tested with ESP32, ESP8266, Arduino UNO and stm32f103c and found that it can be used without modifying the code in the working part or having to modify the source code to make it compatible with the platform.

(Figure. 1 dht22 and BluePill)
Read More

[EN] Digital Compass Sensor

This article describes the MicroPython GY-271 digital compass sensor for use with the ESP8266 or ESP32 (we have experimented with STM32F411CEU6 with Raspberry Pi 3B+ and 4B and found that it can be used as well) to set the operation and read the X,Y and Z axis values from the sensor, then calculate it as the degree of north.

(Figure. 1 GY-271 usage)
Read More

[EN] ESP8266 and OLED

This article is about connecting the ESP8266 to an OLED, which is a two-color graphic LED, where 0 represents blank and 1 represents color dot. It is connected to the microcontroller via the I2C bus. How to use it and its functions are discussed as a guide and reference material for further implementation.

(Figure. 1 OLED usage)
Read More