-
Notifications
You must be signed in to change notification settings - Fork 0
/
Set_RTC_Time.ino
24 lines (21 loc) · 714 Bytes
/
Set_RTC_Time.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RTC Time Set Code, CC By-NC 2022 Eric Woo-Shem
/*
Info:
RTC = Real Time Clock
Time given will be in military time (24 hour clock)
Resources Used:
https://learn.adafruit.com/adafruit-scd30
https://www.circuitbasics.com/writing-data-to-files-on-an-sd-card-on-arduino/
https://arduinogetstarted.com/tutorials/arduino-rtc
https://github.com/adafruit/RTClib/tree/master/examples
*/
#include "RTClib.h"
RTC_DS1307 rtc;
void setup() {
rtc.begin();
rtc.adjust(DateTime(2021, 10, 14, 18, 02, 00)); // Sets date to 10/13/2021, Time: 18:17:00 in 24 hour time
/*
* To set Date/Time, change the numbers in the parenthesis to be current (Year, month, day, hour(24 hr time), minute, second)
*/
}
void loop() {}