Arduino UNO R4 WiFi Real-Time Clock

Started by tha, October 27, 2023, 02:11:51 PM

Previous topic - Next topic

tha

Network Time Protocol (NTP)

เพื่อดึงเอาและจัดเก็บ the current time, เราสามารถส่งคำขอไปยัง an NTP server, pool.ntp.org. สิ่งนี้จะดึง the UNIX time stamp และเก็บมันใน an RTC object.

Code Source on Github







โปรดทราบว่าคุณจะต้องสร้างแท็บใหม่ชื่อ arduino_secrets.h สิ่งนี้ถูกใช้ใช้เพื่อจัดเก็บข้อมูลประจำตัวของคุณ ในไฟล์นี้ คุณจะต้องเพิ่ม:

tha

Summary

บทช่วยสอนนี้แสดงวิธีใช้ the RTC บน the UNO R4 WiFi, อย่างเช่นการตั้ง a start time, การตั้ง an alarm, หรือการรับเวลาในรูปแบบปฏิทินหรือยูนิกซ์.

อ่านเพิ่มเติมเกี่ยวกับบอร์ดนี้ใน the Arduino UNO R4 WiFi documentation.