0.1.0 • Published 10 years ago

ds1337 v0.1.0

Weekly downloads
2
License
MIT
Repository
-
Last release
10 years ago

DS1337js

nodejs driver for RTC DS1337, enables reading and writing time to the RTC and using the 2 RTC alarms

Was develop using a beaglebone it should work with rasberry pi also or any device that can use node-i2c

Basic usage

var rtc = require('./ds1337.js'),
	clock = new rtc({device:'/dev/i2c-1'}); // change /dev/i2c-1 with your device
    
var now = new Date(); 

clock.setTime(now);

clock.getTime(function(datetime) {
    console.log(datetime+"\r");
});
0.1.0

10 years ago