[TH] แสดงเวลาจาก NTP และ TimeLib ด้วย esp8266

บทความนี้เป็นตัวอย่างการใช้ไลบรารี NTP และ TimeLib ของเฟรมเวิร์ก Arduino กับ ESP-01s (ดังภาพที่ 1) หรือ esp8266 เพื่อรายงานเวลาปัจจุบันผ่านทางเว็บที่ให้บริการโดยไมโครคอนโทรลเลอร์ esp8266 ซึ่งในตัวอย่างนี้มีการเรียกใช้ไลบรารี NTPClient และ TimeLib โดยต้องมีการเชื่อมต่อเข้ากับเครือข่ายอินเทอร์เน็ตในการอ่านวันที่และเวลาจากเครื่องให้บริการ NTP เช่น time.nist.gov เป็นต้น

ภาพที่ 1 โมดูล ESP-01s บนบอร์ด dCore-0 รุ่น 0.7
Read More

[TH] แถบแสดงค่าอุณหภูมิและความชื้น

บทความนี้เป็นตัวอย่างโปรแกรมสำหรับกรณีที่ต้องการแสดงแถบแสดงค่าอุณหภูมิและความชื้นดังภาพที่ 1 ด้วย MicroPython กับบอร์ด esp32 ที่ติดตั้ง OLED จะเขียนอย่างไร โดยอุปกรณ์ในการทดลองครั้งนี้ใช้ DHT22 เป็นอุปกรณ์วัดความชื้นและอุณหภูมิ โดยบอร์ดเชื่อมต่อกับบัส I2C เพื่อสื่อสารกับ OLED ผ่านทางขา GPIO4 และ GPIO5 สำหรับทำหน้าที่ SCL และ SDA ตามลำดับ พร้อมกันนี้ได้ต่อขาสัญญาณของ DHT22 เข้ากับขา GPIO15 เพื่อใช้สื่อสารกันระหว่างเซ็นเซอร์กับไมโครคอนโทรเลอร์

ภาพที่ 1 ตัวอย่างผลัพธ์ของการแสดงแถบแสดงค่าอุณหภูมิและความชื้น
Read More

[EN] Installing NumPy and Matplotlib on Raspberry Pi

This article guides on installing the NumPy and Matplotlib libraries on the Raspberry Pi board for computing (Read an example of using numpy for small devices in the ulab article) and shows results. The article discusses installation, upgrades and basic usage to guide further implementation. As for the use of Raspberry Pi with Python programming language, you can find more information from various knowledge sources or support our team by purchasing a book or finding a Raspberry Pi 4 4GB board that can be purchased from various retailers or from here, Though, we use a Raspberry Pi 3 B+.

Read More

[EN] ulab EP 7 approx

EP 7 of the ulab library series deals with the approx submodule used for approximation of numbers, function results or find the root of a function using bisect or newton method and trapz determination. In this article, we discuss the roles of each function and how to use them and sample programs as a guideline for further study and application.

Read More

[TH] List Class Application Node: Count the frequency from a random value.

บทความนี้เป็นการประยุกต์ใช้โครงสร้างข้อมูลประเภทลิสต์ (list) ของภาษาไพธอนเพื่อเก็บการนับความถี่ของตัวเลขที่สุ่ม ซึ่งมีประโยชน์ต่อการนำไปใช้ทางสถิติต่อไป ซึ่งบทความนี้อาศัยความรู้เรื่องของการสุ่มตัวเลข และการใช้ตัวแปรประเภทลิสต์ โดยทดสอบการทำงานกับ Micropython บนไมโครคอนโทรลเลอร์ esp8266 และ esp32

ภาพที่ 1 การแสดงกราฟความถี่ของข้อมูล
Read More

[TH] DHT11 Web Report

บทความนี้เป็นการประยุกต์รวมการเขียนโปรแกรมภาษาไพธอนสำหรับ Micropython ที่ใช้กับ esp8266 หรือ esp32 ที่ต่อกับ DHT11 สำหรับเก็บค่าอุณหภูมิและความชื้น โดยรายงานผลอุณหภูมิ 10 รายการหลังสุดที่เก็บทุก 5 วินาทีให้เห็นดังภาพที่ 1

ภาพที่ 1 ตัวอย่างผลลัพธ์ของการแสดงผล
Read More

[EN] ulab EP 6 compare

This article is EP 6 of the MicroPython ulab series, which is about the compare submodule for comparing ulab-generated arrays that Python did not originally support. This article describes the functions and usage of this submodule for further recognition and use.

Read More

[EN] ulab EP 5 numerical

บThe ulab EP 5 discusses the numerical submodule used to calculate the minimum, maximum, sum, mean, and standard deviation. Enable convenience for working in calculating preliminary statistics. The article describes the functionality of the numerical submodule with an example program to illustrate how it works.

Read More