commands:reference:irtcset
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| commands:reference:irtcset [2026/09/01 20:04] – 만듦 - 바깥 편집 127.0.0.1 | commands:reference:irtcset [2026/09/08 00:53] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 12: | 줄 12: | ||
| ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ||
| | '' | | '' | ||
| + | |||
| ===== 예제 ===== | ===== 예제 ===== | ||
| 줄 18: | 줄 19: | ||
| void setup() { | void setup() { | ||
| Serial.begin(115200); | Serial.begin(115200); | ||
| + | if (!IrtcBegin()) return; | ||
| - | if (!IrtcBegin()) { | + | |
| - | | + | |
| - | | + | |
| + | | ||
| } | } | ||
| - | |||
| - | // 최초 한 번 실행한 뒤 주석 처리합니다. | ||
| - | // IrtcSet(2026, | ||
| } | } | ||
| void loop() { | void loop() { | ||
| IrtcDateTime now; | IrtcDateTime now; | ||
| - | | + | |
| - | Serial.print(now.year); | + | float rtcTemperature = 0.0F; |
| - | | + | if (IrtcRead(now) && IrtcUnixTime(unixTime) && IrtcGetTemperature(rtcTemperature)) { // RTC 내부 온도를 반환합니다. / 현재 시간을 Unix 시간으로 반환합니다. / RTC의 날짜와 시간을 읽습니다. |
| - | | + | Serial.print(unixTime); Serial.print(' |
| - | Serial.print('/' | + | |
| - | Serial.print(now.day); | + | |
| - | Serial.print(' | + | |
| - | Serial.print(now.hour); | + | |
| - | Serial.print(':' | + | |
| - | Serial.print(now.minute); | + | |
| - | | + | |
| - | | + | |
| } | } | ||
| delay(1000); | delay(1000); | ||
| 줄 50: | 줄 42: | ||
| 각 장치는 해당 '' | 각 장치는 해당 '' | ||
| + | |||
| + | ===== 같은 카테고리의 내장 명령어 ===== | ||
| + | |||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| [[commands: | [[commands: | ||
commands/reference/irtcset.1788260661.txt.gz · 마지막으로 수정됨: 저자 127.0.0.1
