User Tools

Site Tools


en-us_commands:display_rtc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en-us_commands:display_rtc [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1en-us_commands:display_rtc [2026/09/12 23:27] (current) – 바깥 편집 127.0.0.1
Line 1: Line 1:
 ====== Displays and RTC ====== ====== Displays and RTC ======
  
-===== TM1637 4-Digit FND =====+Functions for a TM1637 FND, character LCD, or DS3231 RTC.
  
-Set the CLK/DIO pins with ''IsegBegin()'', then use ''IsegBrightness()'', ''IsegDecimal()'', ''IsegHex()'', ''IsegWrite()'' and ''IsegClear()''. The ''device'' number identifies up to 7 devices.+===== TM1637 FND =====
  
-===== PCF8574 Character LCD =====+  * [[:en-us_commands:reference:isegbegin|IsegBegin()]] — Sets the CLK/DIO pins and device number of a TM1637 FND display. 
 +  * [[:en-us_commands:reference:isegbrightness|IsegBrightness()]] — Sets display brightness and visibility. 
 +  * [[:en-us_commands:reference:isegclear|IsegClear()]] — Clears the FND display. 
 +  * [[:en-us_commands:reference:isegwrite|IsegWrite()]] — Outputs segment data at the specified position. 
 +  * [[:en-us_commands:reference:isegdecimal|IsegDecimal()]] — Displays an integer in decimal format. 
 +  * [[:en-us_commands:reference:iseghex|IsegHex()]] — Displays an integer in hexadecimal format. 
 +  * [[:en-us_commands:reference:isegencodedigit|IsegEncodeDigit()]] — Converts one digit to segment data.
  
-Start with ''IclcdBegin(address, columns, rows)'', then use ''IclcdSetCursor()'', ''IclcdPrint()'', ''IclcdClear()'', ''IclcdBacklight()'', etc. The ''device'' number identifies up to 4 devices.+===== Character LCD =====
  
-===== DS3231 RTC =====+  * [[:en-us_commands:reference:iclcdbegin|IclcdBegin()]] — Sets the address and screen dimensions of a PCF8574 character LCD. 
 +  * [[:en-us_commands:reference:iclcdclear|IclcdClear()]] — Clears the LCD screen. 
 +  * [[:en-us_commands:reference:iclcdhome|IclcdHome()]] — Moves the cursor to the first position. 
 +  * [[:en-us_commands:reference:iclcdsetcursor|IclcdSetCursor()]] — Moves the cursor to the specified column and row. 
 +  * [[:en-us_commands:reference:iclcddisplay|IclcdDisplay()]] — Turns the LCD display on or off. 
 +  * [[:en-us_commands:reference:iclcdcursor|IclcdCursor()]] — Shows or hides the cursor. 
 +  * [[:en-us_commands:reference:iclcdblink|IclcdBlink()]] — Enables or disables cursor blinking. 
 +  * [[:en-us_commands:reference:iclcdbacklight|IclcdBacklight()]] — Turns the LCD backlight on or off. 
 +  * [[:en-us_commands:reference:iclcdscrollleft|IclcdScrollLeft()]] — Shifts the displayed content one position to the left. 
 +  * [[:en-us_commands:reference:iclcdscrollright|IclcdScrollRight()]] — Shifts the displayed content one position to the right. 
 +  * [[:en-us_commands:reference:iclcdtextdirection|IclcdTextDirection()]] — Sets the text entry direction. 
 +  * [[:en-us_commands:reference:iclcdautoscroll|IclcdAutoscroll()]] — Enables or disables automatic scrolling. 
 +  * [[:en-us_commands:reference:iclcdcreatechar|IclcdCreateChar()]] — Registers a custom character. 
 +  * [[:en-us_commands:reference:iclcdwrite|IclcdWrite()]] — Outputs a character code or custom character. 
 +  * [[:en-us_commands:reference:iclcdcommand|IclcdCommand()]] — Sends an LCD control command directly. 
 +  * [[:en-us_commands:reference:iclcdprint|IclcdPrint()]] — Prints a string or number on the LCD.
  
-^ Command ^ Description ^ +===== RTC =====
-| ''IrtcBegin()'' | Checks the RTC connection and starts using it. | +
-| ''IrtcSet(...)'', ''IrtcRead(dateTime)'' | Sets or reads the date and time. | +
-| ''IrtcUnixTime(unixTime)'' | Reads Unix time. | +
-| ''IrtcGetTemperature(temperature)'' | Reads the internal RTC temperature. | +
-| ''IrtcSetAlarm1(...)'', ''IrtcSetAlarm2(...)'' | Sets the alarm. | +
-| ''IrtcAlarmEnable(...)'', ''IrtcAlarmTriggered(...)'' | Manages alarm enable and trigger status. | +
-| ''IrtcSquareWave(...)'', ''Irtc32kHz(...)'' | Configures the frequency output. |+
  
-<code cpp> +  * [[:en-us_commands:reference:irtcbegin|IrtcBegin()]] — Checks the DS3231 RTC connection and starts using it. 
-void setup() { +  * [[:en-us_commands:reference:irtcread|IrtcRead()]] — Reads the RTC date and time. 
-  IsegBegin(22, 23); +  * [[:en-us_commands:reference:irtcset|IrtcSet()]] — Sets the RTC date and time. 
-  IsegDecimal(1234); +  * [[:en-us_commands:reference:irtcunixtime|IrtcUnixTime()]] — Returns the current time as Unix time. 
-  IclcdBegin(0x27, 16, 2); +  * [[:en-us_commands:reference:irtcgettemperature|IrtcGetTemperature()]] — Returns the internal RTC temperature. 
-  IclcdPrint("ILOGICS"); +  * [[:en-us_commands:reference:irtctimevalid|IrtcTimeValid()]] — Checks whether the RTC time is trustworthy. 
-  IrtcBegin(); +  * [[:en-us_commands:reference:irtcclearoscillatorstopflag|IrtcClearOscillatorStopFlag()]] — Clears the oscillator-stop status flag. 
-} +  * [[:en-us_commands:reference:irtcsetalarm1|IrtcSetAlarm1()]] — Sets alarm 1including seconds. 
-</code>+  * [[:en-us_commands:reference:irtcsetalarm2|IrtcSetAlarm2()]] — Sets alarm with minute resolution. 
 +  * [[:en-us_commands:reference:irtcalarmenable|IrtcAlarmEnable()]] — Enables or disables the specified alarm. 
 +  * [[:en-us_commands:reference:irtcalarmenabled|IrtcAlarmEnabled()]] — Checks whether the specified alarm is enabled. 
 +  * [[:en-us_commands:reference:irtcalarmtriggered|IrtcAlarmTriggered()]] — Checks whether an alarm has triggered and optionally clears its status. 
 +  * [[:en-us_commands:reference:irtcsquarewave|IrtcSquareWave()]] — Configures the RTC square-wave output. 
 +  * [[:en-us_commands:reference:irtc32khz|Irtc32kHz()]] — Enables or disables the RTC 32kHz output.
  
-===== TM1637 Command Prototypes ===== +[[:en-us_commands:builtin|← Built-in function list]]
- +
-^ Return Type ^ Command Prototype ^ +
-| ''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)''+
- +
-===== Character LCD Command Prototypes ===== +
- +
-^ Return Type ^ Command Prototype ^ +
-| ''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 Command Prototypes ===== +
- +
-^ Return Type ^ Command Prototype ^ +
-| ''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)''+
- +
-Run each device's corresponding ''Begin'' command first. Check I²C addresses and pin sharing; if the ''bool'' return value is ''false'', inspect wiring and power. +
- +
-[[:en-us_commands:builtin|← Built-in Command List]]+
  
en-us_commands/display_rtc.1788785565.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki