This article discusses how to use an ultrasonic module with a Raspberry Pi board (the previous article applies to the ESP8266) in Python to show the distance from the sensor to the closest object found.
Read MoreTag: Python
[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.
Read More[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.
Read More[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.
Read More[TH] Queue Data Structure
บทความนี้แนะนำการใช้คลาส list ใน Micropython มาประยุกต์เป็นโครงสร้างข้อมูลคิวที่มีจำนวนสมาชิกจำกัด และทำงานตามหลักการ FIFO (First-In-First-Out) ซึ่งสามารถนำไปประยุกต์ใช้ได้หลากหลาย เช่น ใช้เป็นที่เก็บข้อมูลและเมื่อข้อมูลมีเต็มแล้วแต่ต้องการนำข้อมูลใหม่ใส่เข้าไป ดังนั้น จึงต้องนำข้อมูลเก่าอันดับที่ 1 ที่ใส่เข้ามาออกไป ซึ่งตรงกับหลักการของ FIFO เป็นต้น โดยตัวอย่างในบทความนี้ใช้บอร์ด dCore-miniML (ในภาพที่ 1) อ่านข้อมูลอุณหภูมิของชิพมาเก็บไว้ในโครงสร้างแบบคิวและแสดงผลออกมาในลักษณะของกราฟแท่ง และไมโครไพธอนที่นำมาใช้เป็นเฟิร์มแวร์รุ่น 1.16 (2021-06-23) สำหรับ ESP Module (SPIRAM)
Read More[TH] PyGlet
pyglet เป็นไลบรารีสำหรับภาษาไพธอนเพื่อสร้างหน้าต่าง และมัลติมีเดียข้ามแพล็ตฟอร์มบนระบบปฏิบัติการวินโดวส์ (Windows) แมคโอเอส (macOS) และลินุกซ์ (Linux) สำหรับใช้พัฒนาเกมหรือแอปพลิเคชันเกี่ยวกับวิชวลไลเซชัน ตัวไลบรารีรองรับการสร้างหน้าต่าง การเชื่อมประสานกับผู้ใช้ผ่านทางระบบการทำงานตามเหตุการณ์ รองรับกราฟิกส์ของโอเพนจีแอล (OpenGL) รองรับการโหลดภาพ/วีดิทัศน์ และเล่นเสียงเพลง/ดนตรี โดยบทความนี้กล่าวถึงการติดตั้งและใช้งาน pyglet บน Raspberry Pi 3 B+ และ Raspberry Pi 4 เป็นอุปกรณ์ทดสอบบทความ
Read More[TH] How to finds the nth data from a list?
บทความนี้เรามาทำความเข้าใจและเขียนโปรแกรมเพื่อหาข้อมูลลำดับที่ n จากลิสต์ของข้อมูลด้วยภาษาไพธอน โดยทดสอบกับ Python และ Micropython กัน
Read More[EN] Reading the Accelerator sensor with raspberry pi via I2C Bus.
This article introduces the motion sensor module or moving in the digital 3 axes using the IC MMA7660FC that was written in the previous article to attach with the Raspberry Pi board and write a Python program to connect and read the values to display.
Read More[TH] PyOpenGL
บทความนี้เป็นการใช้ภาษาไพธอนของบอร์ด Raspberry Pi ใช้งานไลบรารี OpenGL เพื่อแสดงผลภาพแบบ 3 มิติเป็นกล่องสี่เหลี่ยมหมุนไปทางแกน X,Y และ Z
Read More[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)
Read More