[TH] Digital Compass Sensor

บทความนี้เป็นการอธิบายการใช้งานเซ็นเซอร์เข็มทิศดิจิทัลรุ่น GY-271 ด้วยภาษาไพธอนของ MicroPython เพื่อใช้งานกับ ESP8266 หรือ ESP32 (และได้ทดลองกับ STM32F411CEU6 กับ Raspberry Pi 3B+ และ 4B แล้วสามารถใช้งานได้เหมือนกัน) เพื่อตั้งค่าการทำงานและอ่านค่าแกน X,Y และ Z จากเซ็นเซอร์ หลังจากนั้นนำมาคำนวณเป็นค่าองศาของทิศเหนือ

ภาพที่ 1 ทดลองใช้ GY-271
Read More

[TH] ESP8266 and OLED

บทความนี้เป็นการเชื่อมต่อ ESP8266 เข้ากับโอแอลอีดี หรือ OLED ซึ่งเป็นแอลอีดีกราฟิกแบบ 2 สี คือ สี 0 แทนไม่แสดงจุดสี และ 1 แทนการแสดงจุดสี โดยเชื่อมต่อกับไมโครคอนโทรลเลอร์ผ่านบัส I2C โดยกล่าวถึงวิธีการใช้และฟังก์ชันสำหรับใช้งานเพื่อเป็นแนวทางและเนื้อหาอ้างอิงในการนำไปใช้ต่อไป

ภาพที่ 1 ตัวอย่างการใช้งาน OLED
Read More

[EN] ESP8266 and 3-Axis Digital Accelerometer

This article introduces the use of motion sensors or digital 3-axis shifting using MMA7660FC IC, which lets us know if this module shifts left/right or forward/backward or up/down, or rotates left/right or front/back and up/down. A library has been created to enable the sensor, set the sampling rate (sample rate), and display the converted value obtained from the module.

(Figure. 1)
Read More

[EN] ESP8266 and I2C LCD 16×2

This article writes a library to operate character LCD modules using I2C bus operation, which uses a PCF8574 module designed to connect to the LCD. This makes it possible to use 2 command pins from ESP8266 to command the LCD module’s 8 pins, namely RS, R/W, EN, A, D0, D1, D2 and D3 simultaneously enable/disable the module backlight of LCD and the LCD module character sharpness can be adjusted from the variable resistor located on the PCF8574 module.

(Figure. 1)
Read More

[EN] ESP8266+RoboServo

This article is an example of programming in Python to operate a DC electric motor called a servo motor, and when a servo motor is used to drive the wheels on the left and right, it can easily work as a wheeled robot. Also, an example program of this article is to commands the movement of a wheel-driven robot to move forward, backward, turn left, turn right and stop.

(Figure. 1)
Read More

[TH] Let’s have fun doing time-lapse with ESP32CAM.

บทความนี้เป็นการประยุกต์ใช้ชุดบอร์ด ESP32CAM เพื่อทำการถ่ายภาพแบบต่อเนื่องโดยกำหนช่วงเวลาระหว่างการถ่ายภาพแต่ละใบหรือที่เรียกว่า time-lapse ซี่งในบทความนี้เขียนโดยใช้ภาษาไพธอน ด้วยการติดตั้งเฟิร์มแวร์ที่ถูกคอมไพล์ด้วยการผนวกไลบรารี camera สำหรับการเชื่อมต่อกับโมดูลกล้องบนบอร์ด ESP32CAM ทำให้การเขียนโปรแกรมสะดวกและปรับแต่งโค้ดได้ง่าย

ภาพที่ 1 บอร์ด ESP32CAM ที่ใช้ในการทดลองครั้งนี้
Read More

[TH] How To Compile MicroPython To Use With ESP32.

บทความนี้เป็นบันทึกย่อขั้นตอนการคอมไพล์ MicroPython เพื่อใช้งานกับบอร์ด ESP32 ด้วยระบบปฏิบัติการลินุกซ์ที่อยู่ในระบบปฏิบัติการ Windows 10 หรือ WSL รุ่น 1 หรือ 2 เพื่อนำไบนารีไฟล์ที่ได้ไปเขียนลงบอร์ด ESP32 ต่อไป

Read More

[TH] ESP32 & NEO-6MV2 GPS Module

บทความนี้เป็นการใช้ ESP32 เชื่อมต่อกับโมดูลจีพีเอสผ่านทางพอร์ตสื่อสารอนุกรมลำดับที่ 2 ของ ESP32 เพื่ออ่านข้อมูลและแสดงผลข้อมูลที่ได้รับจากโมดูลจีพีเอส และแสดงความหมายที่อ่านได้ โดยตัวอย่างโปรแกรมที่ 1 เป็นการอ่านค่าจากโมดูลจีพีเอส และตัวอย่างที่ 2 เป็นการแสดงสารสนเทศที่อ่านได้จากโมดูลจีพีเอสเพื่อให้ผู้อ่านได้นำไปปรับปรุงแก้ไขต่อไป

ภาพที่ 1 โมดูลจีพีเอส NEO-6MV2
Read More