DS1307 and AT24C32 on TinyRTC
tested on ESP8266-04,12E/F 1v95
var SDA = D5, SCL = D4; // ESP8266 I2C1.setup({scl:SCL,sda:SDA, bitrate:100000}); var rtc = require("DS3231").connect(I2C1, { DST : true }); rtc.setDate(Date().getDate(),Date().getMonth(),Date().getFullYear()); rtc.setTime(Date().getHours(),Date().getMinutes(), Date().getSeconds()); setInterval(function() { console.log(rtc.readDateTime()); }, 1000); /* output 23/00/18 22:06:20 23/00/18 22:06:30 23/00/18 22:06:40 */
1 Attachment
@MaBe started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
DS1307 and AT24C32 on TinyRTC
tested on ESP8266-04,12E/F 1v95
1 Attachment