Simple time relay based on Arduino and RTC
To config project for own needs You should change (in src/main.cpp):
const uint16_t m_period_time = 15; ///< period when relay is turning on
const uint16_t m_active_time = 2; ///< how long relay is turned on
From start, it's turning on relay after 15 minutes, next after 2 minutes turn off, and after next 15 minutes turn on in the loop
Setting the time is executing when the project is built and uploaded to the board with the connected RTC
If you want additional information delete ; in
paltformio.ini
;build_flags = -D DEBUG
It isn't work for RTC_DS3231
You can use ready RTC module
or use chip with other elements.
The project is prepared for the Platform IO environment. A video on how to install such an environment can be watched on this video.
Formatting is executed using clang-format. The description of the tool configuration is in the video.
The code contains a comment prepared for doxygen, their use is described in the video.