B4R Code Snippet DS3231 Clock - Another Snippet

rodmcm

Active Member
Licensed User
This is a simple read and write with only 4 subroutines and no library

If of interest the ZS-042 module contains a DS3231 and on board I2C EEprom so you can get time and storage on one unit. See External EEPROM in the questions section for the latter ( though I must admit I haven't tried it on this module)
 

Attachments

Johan Schoeman

Expert
Licensed User
Hello @rodmcm

Nice project and working after a minor mod to the code of your project in post #2. Please just check - you are missing Saturday in your Daylist() array and your sample project sets the date to 31 April 2020 (April has 30 days).

B4X:
Public Daylist() As String = Array As String ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday")
B4X:
setDS3231Time(DS3231_I2Address,43,59,23,2,31,4,20)   'DS3231Address, seconds, minutes, hours, DOW, DOM, month, year
....only 4 subroutines and no library
It uses library rWire....?
 
Last edited:
Top