This article describes the MicroPython GY-271 digital compass sensor for use with the ESP8266 or ESP32 (we have experimented with STM32F411CEU6 with Raspberry Pi 3B+ and 4B and found that it can be used as well) to set the operation and read the X,Y and Z axis values from the sensor, then calculate it as the degree of north.
Read MoreTag: QMC5883L
[TH] Digital Compass Sensor
บทความนี้เป็นการอธิบายการใช้งานเซ็นเซอร์เข็มทิศดิจิทัลรุ่น GY-271 ด้วยภาษาไพธอนของ MicroPython เพื่อใช้งานกับ ESP8266 หรือ ESP32 (และได้ทดลองกับ STM32F411CEU6 กับ Raspberry Pi 3B+ และ 4B แล้วสามารถใช้งานได้เหมือนกัน) เพื่อตั้งค่าการทำงานและอ่านค่าแกน X,Y และ Z จากเซ็นเซอร์ หลังจากนั้นนำมาคำนวณเป็นค่าองศาของทิศเหนือ
Read More