[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] 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] Tic-Tac-Toe

This article is a collection of examples of Tic-Tac-Toe games that our team uses to teach game development in different languages ​​as appropriate for the group of learners. But most of them use Python for teaching because it is easier to explain and write than other languages. In addition to wanting to see how it can be implemented on other platforms, we used an example with the MicroPython of a board we named ml4m. Based on this board, TensorFlow Lite is installed on an ESP32 with a 4MB ROM. The board looks like Figure 1.

(Figure. 1 ml4m for testing Tic-Tac-Toe)
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