[EN] Client/Server Programming for Weather Stations via Wireless Networking

This article is a client/server programming example for a wireless network weather station (Client/Server Programming for Weather Stations via Wireless Networking) using two esp32 microcontrollers communicate over a wireless network. By setting the DHT22 and LDR sensor installed as a server working in AP mode and another esp32 microcontroller board working as a client and media via a custom port to read the temperature, humidity and digital values ​​obtained from the LDR sensor as shown in Figure 1.

(Figure. 1 Our board)
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

[TH] Play the Wav File with ESP32.

บทความนี้เป็นการประยุกต์ใช้ DAC และ MicroPython ของไมโครคอนโทรลเลอร์ ESP32 เพื่อเปิดไฟล์ WAV ซึ่งเป็นไฟล์บันทึกเสียง และนำออกไปยัง DAC ที่เชื่อมต่อกับลำโพงดังภาพที่ 1 โดยไฟล์ที่นำมาใช้นั้นเป็นไฟล์แบบเสียงโมโน (mono) แบบ PCM 8 บิตที่ไม่ได้ถูกบีบอัด และโปรแกรมตัวอย่างรองรับการทำ Sampling Rate ที่ประมาณ 50KHz หรือที่ระดับ 44100

ภาพที่ 1 ตัวอย่างบอร์ดสำหรับทดสอบการทำงานของบทความ
Read More

[EN] 15-Puzzle Game

This article is an example of a 15-Puzzle game using the ml4m board with the results shown in Figure 1. It is a game that allows players to practice their strategic thinking skills, looking ahead to plan their shifting numbers. In addition to being in the form of numbers, it can also be changed from numbers to images, that is, transformed into an image and divided into 16 parts, and then allow the player to move the image to make it the same as the original. Also in the example, a buzzer is used to generate a beep sound using an 8-bit DAC of an esp32 microcontroller, as well as programming in Python on MicroPython.

(Figure. 1 4×4 random)
Read More

[EN] ESP32-ML4M : Tic-Tac-Toe Ep.2

From the article Tic-Tac-Toe games or OC games played with computers (esp32) via the console of the terminal program are inconvenient. Now let’s learn how to use the esp32 peripheral circuit of the ML4M board (Figure 1), how it has an I/O circuit and how is Tic-Tac-Toe game is played through the device in which the code works with the joystick module and touch switch.

(Figure. 1 ml4m for Tic-Tac-Toe testing)
Read More

[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] How to build MicroPython for SAM-D21.

หลังจากที่ได้แนะนำบอร์ดไมโครคอนโทรลเลอร์ SAM-D21 ดังภาพที่ 1 และการใช้ ADC/DAC ของชิพตัวนี้ที่เป็นไมโครคอนโทรลเลอร์สถาปัตยกรรม ARM 32 บิต แบบ Cortex-M0+ ในครั้งนี้เรามาลองคอมไพล์และใช้ภาษาไพธอนสำหรับบอร์ดตัวนี้กัน

ภาพที่ 1 บอร์ด SAM-D21
Read More

[EN] Queue Data Structure

This article introduces the use of the list class in Micropython as a queue data structure with a limited number of members. It works according to the FIFO (First-In-First-Out) principle, which can be applied in a variety of applications, such as being used as a storage, and when the data is full but we need to insert new data, the old data must be pop out. The example in this article uses the dCore-miniML board (Figure 1) to read the temperature of the chip and store it in a Queue structure and display it in a bar graph and Micropython implemented firmware version 1.16 (2021-06-23) for the ESP Module (SPIRAM).

(Figure. 1 An example of drawing a graph with data stored in a queued data structure)
Read More