[EN] QRCode Detected!

This article describes how to use OpenCV to find QRCode from an image from a Web Camera connected to the Raspberry Pi via a USB port. The example contains an example of reading the results from a web camera. And exit the program by pressing the ESC key, the QRCode search example and decoding the text within the image and storing the result in the image file.

(Figure. 1)

[EN] Speech to Text & Text to Speech

This article is an example of python implementation to call a speech-to-text service, then send a message to Google’s text-to-speech service to generate and return an mp3 audio file, and finally, use pygame to play the speech out of the speaker. It runs on the Windows operating system.

[EN] Data Science Ep1 Pandas

This article is an implementation of Python’s Pandas library using the Raspberry Pi 3 B+ board. It can be applied to Python of Windows, macOS or Linux operating systems. The article will be divided into several episodes like the previous ulab library. The article EP 1 discusses Pandas features, installation and data structure of Pandas.

[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 ตัวอย่างการวาดกราฟด้วยข้อมูลที่เก็บในโครงสร้างข้อมูลแบบคิว

[TH] PyGlet

pyglet เป็นไลบรารีสำหรับภาษาไพธอนเพื่อสร้างหน้าต่าง และมัลติมีเดียข้ามแพล็ตฟอร์มบนระบบปฏิบัติการวินโดวส์ (Windows) แมคโอเอส (macOS) และลินุกซ์ (Linux) สำหรับใช้พัฒนาเกมหรือแอปพลิเคชันเกี่ยวกับวิชวลไลเซชัน ตัวไลบรารีรองรับการสร้างหน้าต่าง การเชื่อมประสานกับผู้ใช้ผ่านทางระบบการทำงานตามเหตุการณ์ รองรับกราฟิกส์ของโอเพนจีแอล (OpenGL) รองรับการโหลดภาพ/วีดิทัศน์ และเล่นเสียงเพลง/ดนตรี โดยบทความนี้กล่าวถึงการติดตั้งและใช้งาน pyglet บน Raspberry Pi 3 B+ และ Raspberry Pi 4 เป็นอุปกรณ์ทดสอบบทความ

ภาพที่ 1 ตัวอย่างจาก 1-6

[TH] PyQt5

บทความนี้เป็นตัวอย่างการเปิดหน้าต่างและใช้ปุ่มเพื่อตอบสนอง PyQt5 ซึ่งเป็นพื้นฐานเบื้องต้นของการใช้คอมโพเนนท์อื่น ๆ ต่อไป โดยจุดเด่นของ Qt คือ เป็นชุดพัฒนาภาษา C++ ที่ข้ามแพล็ตฟอร์มและมีการครอบการเชื่อมผสานเพื่อใช้กับภาษาต่าง ๆ ได้ เช่น PyQt อันเป็น “The python binding for the Qt cross-platform C++ framework” ที่พัฒนาโดย Riverbank Computing Limited ซึ่งปัจจุบันออกรุ่น PyQt 6.1.1 (2021-06-29)