en-us_commands:reference:irtcsquarewave
This is an old revision of the document!
Table of Contents
IrtcSquareWave()
IrtcSquareWave() configures the RTC square-wave output.
bool IrtcSquareWave(bool enable, uint8_t frequency = IRTC_SQUARE_WAVE_1HZ, bool batteryPowered = false)
Commands
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
IrtcSquareWave(enable, frequency, batteryPowered) | bool enableuint8_t frequency = IRTC_SQUARE_WAVE_1HZbool batteryPowered = false | bool | Configures the RTC square-wave output. |
Example
void setup() { if (!IrtcBegin()) return; // Output a 1Hz square wave on the INT/SQW terminal. IrtcSquareWave(true, IRTC_SQUARE_WAVE_1HZ); } void loop() { }
Precautions
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/reference/irtcsquarewave.1788785568.txt.gz · Last modified: by 127.0.0.1
