en-us_commands:reference:irtc32khz
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en-us_commands:reference:irtc32khz [2026/09/08 00:53] – 바깥 편집 127.0.0.1 | en-us_commands:reference:irtc32khz [2026/09/14 20:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Example ===== | ===== Example ===== | ||
| + | |||
| + | This example connects a DS3231 RTC module to the MPINO-16A8R8T I²C port. The RTC's 32 kHz and square-wave outputs use different pins. | ||
| <code cpp> | <code cpp> | ||
| void setup() { | void setup() { | ||
| Serial.begin(115200); | Serial.begin(115200); | ||
| - | if (!IrtcBegin()) | + | if (!IrtcBegin()) |
| - | IrtcSquareWave(true, | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | void loop() { | + | |
| - | if (Iup(0, IdigitalRead(0, | + | |
| - | IrtcSquareWave(false); // Set the RTC square-wave output. | + | |
| - | | + | |
| } | } | ||
| + | const bool configured = Irtc32kHz(true); | ||
| + | Serial.println(configured ? F(" | ||
| } | } | ||
| + | |||
| + | void loop() {} | ||
| </ | </ | ||
en-us_commands/reference/irtc32khz.1788796401.txt.gz · Last modified: by 127.0.0.1
