ds3231-rtc
v1.0.4
Published
This package is to use DS3231 realtime clock module with nodejs
Downloads
2
Readme
#DS3231 RTC module
This package is an attempt to make it easy to read data from ds3231 Real time clock module connected to Raspberry pi through I2C.
However there might be a delay when a function is called. To get few details at same time like minutes and hours together, one function should be called withing the callback of the other function. please check example below.
##Usage
const rtc = require('ds3231-rtc');
rtc.min((data1)=>{
rtc.hr((data2)=>{
console.log('Time '+ data2 +':'+ data1);
})});
###To set time to module
rtc.set()
###Other functions
rtc.sec((data)=>{}) // seconds
rtc.min((data)=>{}) // minutes
rtc.hr((data)=>{}) // hours
rtc.mn((data)=>{}) // month
rtc.date((data)=>{}) // date
rtc.yr((data)=>{}) // year