Datasheet
find these lines:
Change the False to True in the first line, and update the time.struct_time to have the current time starting from year to
weekday . The last two entries can stay at -1
Re-run the sketch by saving and you'll see this out of the REPL:
Note the part where the program says it is Setting time to:
Now you can go back and change the if True to if False and save, so you don't re-set the RTC again.
The script will now output the time and date
if False: # change to True if you want to write the time!
# year, mon, date, hour, min, sec, wday, yday, isdst
t = time.struct_time((2017, 10, 29, 15, 14, 15, 0, -1, -1))
# you must set year, mon, date, hour, min, sec and weekday
# yearday is not supported, isdst can be set but we don't do anything with it at this time
© Adafruit Industries https://learn.adafruit.com/adafruit-adalogger-featherwing Page 20 of 36