• DS1307 and AT24C32 on TinyRTC

    • integrated 3.73 pullups
    • used module DS3231 - work perfect with DS1307
    • 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().getM­onth(),Date().getFullYear());
    rtc.setTime(Date().getHours(),Date().get­Minutes(), 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

    • SKU099560L.jpg
About

Avatar for MaBe @MaBe started