SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
pcf8563_alarm.ino File Reference

@license MIT License More...

#include <RtcDrv.hpp>
Include dependency graph for pcf8563_alarm.ino:

Go to the source code of this file.

Macros

#define SENSOR_SDA   42
 
#define SENSOR_SCL   41
 
#define SENSOR_IRQ   14
 

Functions

void setup ()
 
void printDateTime ()
 
void testAlarmMinute ()
 
void testAlarmHour ()
 
void testAlarmDay ()
 
void loop ()
 

Variables

SensorPCF8563 rtc
 
uint32_t intervalue = 0
 
uint8_t nextHour = 22
 
uint8_t nextMonth = 1
 
uint8_t nextDay = 1
 
uint8_t nextMinute = 59
 
uint8_t nextSecond = 55
 

Detailed Description

@license MIT License

Copyright (c) 2022 lewis he

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
Lewis He (lewis.nosp@m.he@o.nosp@m.utloo.nosp@m.k.co.nosp@m.m)
Date
2022-12-11

Definition in file pcf8563_alarm.ino.

Macro Definition Documentation

◆ SENSOR_IRQ

#define SENSOR_IRQ   14

Definition at line 41 of file pcf8563_alarm.ino.

◆ SENSOR_SCL

#define SENSOR_SCL   41

Definition at line 37 of file pcf8563_alarm.ino.

◆ SENSOR_SDA

#define SENSOR_SDA   42

Definition at line 33 of file pcf8563_alarm.ino.

Function Documentation

◆ loop()

void loop ( )

Definition at line 174 of file pcf8563_alarm.ino.

References testAlarmDay(), testAlarmHour(), and testAlarmMinute().

◆ printDateTime()

void printDateTime ( )

/ Format output time* Option: DT_FMT_HM, // Format Style : Hour:Minute DT_FMT_HMS, // Format Style : Hour:Minute:Second DT_FMT_YMD, // Format Style : Year-Month-Day DT_FMT_MDY, // Format Style : Month-Day-Year DT_FMT_DMY, // Format Style : Day-Month-Year DT_FMT_YMD_HMS, // Format Style : Year-Month-Day/Hour:Minute:Second Default : DT_FMT_YMD_HMS_WEEK // Format Style : Year-Month-Day/Hour:Minute:Second - Weekday

Definition at line 78 of file pcf8563_alarm.ino.

References intervalue, rtc, and SensorRTC::strftime().

Referenced by testAlarmDay(), testAlarmHour(), and testAlarmMinute().

◆ setup()

◆ testAlarmDay()

◆ testAlarmHour()

◆ testAlarmMinute()

Variable Documentation

◆ intervalue

uint32_t intervalue = 0

Definition at line 47 of file pcf8563_alarm.ino.

Referenced by printDateTime().

◆ nextDay

uint8_t nextDay = 1

Definition at line 50 of file pcf8563_alarm.ino.

Referenced by setup(), testAlarmDay(), testAlarmHour(), and testAlarmMinute().

◆ nextHour

uint8_t nextHour = 22

Definition at line 48 of file pcf8563_alarm.ino.

Referenced by setup(), testAlarmDay(), testAlarmHour(), and testAlarmMinute().

◆ nextMinute

uint8_t nextMinute = 59

Definition at line 51 of file pcf8563_alarm.ino.

Referenced by setup(), testAlarmDay(), testAlarmHour(), and testAlarmMinute().

◆ nextMonth

uint8_t nextMonth = 1

Definition at line 49 of file pcf8563_alarm.ino.

Referenced by setup(), testAlarmDay(), testAlarmHour(), and testAlarmMinute().

◆ nextSecond

uint8_t nextSecond = 55

Definition at line 52 of file pcf8563_alarm.ino.

Referenced by setup(), testAlarmDay(), testAlarmHour(), and testAlarmMinute().

◆ rtc