[TH] Play the Wav File with ESP32.

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

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

[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)