commands:display_rtc
문서의 이전 판입니다!
표시 장치와 RTC
TM1637 4자리 FND
IsegBegin()으로 CLK·DIO 핀을 설정한 뒤 IsegBrightness(), IsegDecimal(), IsegHex(), IsegWrite(), IsegClear()를 사용합니다. device 번호로 최대 7대를 구분합니다.
PCF8574 문자 LCD
IclcdBegin(address, columns, rows)으로 시작한 뒤 IclcdSetCursor(), IclcdPrint(), IclcdClear(), IclcdBacklight() 등을 사용합니다. device 번호로 최대 4대를 구분합니다.
DS3231 RTC
| 명령어 | 설명 |
|---|---|
IrtcBegin() | RTC 연결을 확인하고 사용을 시작합니다. |
IrtcSet(…), IrtcRead(dateTime) | 날짜·시간을 설정하거나 읽습니다. |
IrtcUnixTime(unixTime) | Unix 시간을 읽습니다. |
IrtcGetTemperature(temperature) | RTC 내부 온도를 읽습니다. |
IrtcSetAlarm1(…), IrtcSetAlarm2(…) | 알람을 설정합니다. |
IrtcAlarmEnable(…), IrtcAlarmTriggered(…) | 알람 사용 여부와 발생 상태를 관리합니다. |
IrtcSquareWave(…), Irtc32kHz(…) | 주파수 출력을 설정합니다. |
void setup() { IsegBegin(22, 23); IsegDecimal(1234); IclcdBegin(0x27, 16, 2); IclcdPrint("ILOGICS"); IrtcBegin(); }
TM1637 명령어 원형
| 반환형 | 명령어 원형 |
|---|---|
bool | IsegBegin(uint8_t clkPin, uint8_t dioPin, uint16_t bitDelayUs = 100, uint8_t device = 0) |
bool | IsegBrightness(uint8_t brightness, bool on = true, uint8_t device = 0) |
bool | IsegClear(uint8_t device = 0) |
bool | IsegWrite(const uint8_t segments[], uint8_t length = 4, uint8_t position = 0, uint8_t device = 0) |
bool | IsegDecimal(int32_t number, bool leadingZero = false, uint8_t dotPosition = 0, uint8_t length = 4, uint8_t position = 0, uint8_t device = 0) |
bool | IsegHex(uint32_t number, bool leadingZero = false, uint8_t dotPosition = 0, uint8_t length = 4, uint8_t position = 0, uint8_t device = 0) |
uint8_t | IsegEncodeDigit(uint8_t digit) |
문자 LCD 명령어 원형
| 반환형 | 명령어 원형 |
|---|---|
bool | IclcdBegin(uint8_t address, uint8_t columns, uint8_t rows, bool backlight = true, uint8_t device = 0) |
bool | IclcdClear(uint8_t device = 0) |
bool | IclcdHome(uint8_t device = 0) |
bool | IclcdSetCursor(uint8_t column, uint8_t row, uint8_t device = 0) |
bool | IclcdDisplay(bool on = true, uint8_t device = 0) |
bool | IclcdCursor(bool on = true, uint8_t device = 0) |
bool | IclcdBlink(bool on = true, uint8_t device = 0) |
bool | IclcdBacklight(bool on = true, uint8_t device = 0) |
bool | IclcdScrollLeft(uint8_t device = 0) |
bool | IclcdScrollRight(uint8_t device = 0) |
bool | IclcdTextDirection(bool leftToRight = true, uint8_t device = 0) |
bool | IclcdAutoscroll(bool on = true, uint8_t device = 0) |
bool | IclcdCreateChar(uint8_t location, const uint8_t charmap[8], uint8_t device = 0) |
bool | IclcdWrite(uint8_t value, uint8_t device = 0) |
bool | IclcdCommand(uint8_t command, uint8_t device = 0) |
bool | IclcdPrint(const char value[], uint8_t device = 0) |
bool | IclcdPrint(const String& value, uint8_t device = 0) |
bool | IclcdPrint(const __FlashStringHelper* value, uint8_t device = 0) |
bool | IclcdPrint(char value, uint8_t device = 0) |
bool | IclcdPrint(unsigned char value, int base = DEC, uint8_t device = 0) |
bool | IclcdPrint(int value, int base = DEC, uint8_t device = 0) |
bool | IclcdPrint(unsigned int value, int base = DEC, uint8_t device = 0) |
bool | IclcdPrint(long value, int base = DEC, uint8_t device = 0) |
bool | IclcdPrint(unsigned long value, int base = DEC, uint8_t device = 0) |
bool | IclcdPrint(double value, int digits = 2, uint8_t device = 0) |
RTC 명령어 원형
| 반환형 | 명령어 원형 |
|---|---|
bool | IrtcBegin() |
bool | IrtcRead(IrtcDateTime& dateTime) |
bool | IrtcSet(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second) |
bool | IrtcSet(uint16_t year, uint8_t month, uint8_t day, uint8_t dayOfWeek, uint8_t hour, uint8_t minute, uint8_t second) |
bool | IrtcUnixTime(uint32_t& unixTime) |
bool | IrtcGetTemperature(float& temperature) |
bool | IrtcTimeValid(bool& valid) |
bool | IrtcClearOscillatorStopFlag() |
bool | IrtcSetAlarm1(uint8_t mode, uint8_t dayOrDate = 1, uint8_t hour = 0, uint8_t minute = 0, uint8_t second = 0) |
bool | IrtcSetAlarm2(uint8_t mode, uint8_t dayOrDate = 1, uint8_t hour = 0, uint8_t minute = 0) |
bool | IrtcAlarmEnable(uint8_t alarm, bool enable = true) |
bool | IrtcAlarmEnabled(uint8_t alarm, bool& enabled) |
bool | IrtcAlarmTriggered(uint8_t alarm, bool& triggered, bool clear = true) |
bool | IrtcSquareWave(bool enable, uint8_t frequency = IRTC_SQUARE_WAVE_1HZ, bool batteryPowered = false) |
bool | Irtc32kHz(bool enable = true) |
각 장치는 해당 Begin 명령어를 먼저 실행하십시오. I²C 주소와 핀 공유 여부를 확인하고, bool 반환값이 false이면 배선과 전원을 점검하십시오.
commands/display_rtc.1788184327.txt.gz · 마지막으로 수정됨: 저자 127.0.0.1
