[TH] Queue Data Structure

บทความนี้แนะนำการใช้คลาส list ใน Micropython มาประยุกต์เป็นโครงสร้างข้อมูลคิวที่มีจำนวนสมาชิกจำกัด และทำงานตามหลักการ FIFO (First-In-First-Out) ซึ่งสามารถนำไปประยุกต์ใช้ได้หลากหลาย เช่น ใช้เป็นที่เก็บข้อมูลและเมื่อข้อมูลมีเต็มแล้วแต่ต้องการนำข้อมูลใหม่ใส่เข้าไป ดังนั้น จึงต้องนำข้อมูลเก่าอันดับที่ 1 ที่ใส่เข้ามาออกไป ซึ่งตรงกับหลักการของ FIFO เป็นต้น โดยตัวอย่างในบทความนี้ใช้บอร์ด dCore-miniML (ในภาพที่ 1) อ่านข้อมูลอุณหภูมิของชิพมาเก็บไว้ในโครงสร้างแบบคิวและแสดงผลออกมาในลักษณะของกราฟแท่ง และไมโครไพธอนที่นำมาใช้เป็นเฟิร์มแวร์รุ่น 1.16 (2021-06-23) สำหรับ ESP Module (SPIRAM)

ภาพที่ 1 ตัวอย่างการวาดกราฟด้วยข้อมูลที่เก็บในโครงสร้างข้อมูลแบบคิว

[EN] ESP32 : Display of rotation squares with application ulab.

This article uses the ESP32 to rotate squares using the ulab library and to display the results of the calculations on the ST7735s LCD graphics module as written in the previous article. The example of the program consists of rotating a square in a clockwise direction and rotating multiple squares in opposite directions

(Video 1 An example of the performance with the display speed adjusted.)