Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. ESP8266 Gateway and I2C RTC

ESP8266 Gateway and I2C RTC

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amongstmyselves
    wrote on last edited by amongstmyselves
    #1

    Hi all,

    First time post. Have been slowly learning the basics of this wonderful library.

    I have an ESP8266 NodeMCU as my gateway. It has a nRF24.. radio for communication to the nodes. I've also placed a SD card module on the gateway which appears to be working. This setup appears to be communicating fine with my first node. The SD card module is there for logging as I would like a record of all the goings on in my planned array of nodes.

    Just to try my luck I also want to place a RTC module on the gateway mostly so I could also log the date and time an event occurred. I have a DS3231 module that works on my test Nano. So I've tried it on the ESP8266 with no problems using the same test code as the Nano which is the DS3132 sketch from the RTClib written by Adafruit. But when I incorporate this code into the Gateway code the clock no longer functions giving me an incorrect date and time.

    I've just rechecked and it appears the RTC code doesn't work on the ESP8266 in either situation. So I suppose my question now changes to - Does I2C work on the ESP8266 ? I am using D1 for SCL and D2 for SDA as I read.

    Any leads would be greatly appreciated.

    Steve

    YveauxY 1 Reply Last reply
    0
    • A amongstmyselves

      Hi all,

      First time post. Have been slowly learning the basics of this wonderful library.

      I have an ESP8266 NodeMCU as my gateway. It has a nRF24.. radio for communication to the nodes. I've also placed a SD card module on the gateway which appears to be working. This setup appears to be communicating fine with my first node. The SD card module is there for logging as I would like a record of all the goings on in my planned array of nodes.

      Just to try my luck I also want to place a RTC module on the gateway mostly so I could also log the date and time an event occurred. I have a DS3231 module that works on my test Nano. So I've tried it on the ESP8266 with no problems using the same test code as the Nano which is the DS3132 sketch from the RTClib written by Adafruit. But when I incorporate this code into the Gateway code the clock no longer functions giving me an incorrect date and time.

      I've just rechecked and it appears the RTC code doesn't work on the ESP8266 in either situation. So I suppose my question now changes to - Does I2C work on the ESP8266 ? I am using D1 for SCL and D2 for SDA as I read.

      Any leads would be greatly appreciated.

      Steve

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @amongstmyselves Welcome to the forum!
      I2c should just work fine on esp8266.
      I don't have access to the esp pin layout atm, so I cannot check your pin mapping, but I wondered if you have the required pull-up resistors on the i2c scl and sda lines?

      http://yveaux.blogspot.nl

      A 1 Reply Last reply
      0
      • YveauxY Yveaux

        @amongstmyselves Welcome to the forum!
        I2c should just work fine on esp8266.
        I don't have access to the esp pin layout atm, so I cannot check your pin mapping, but I wondered if you have the required pull-up resistors on the i2c scl and sda lines?

        A Offline
        A Offline
        amongstmyselves
        wrote on last edited by
        #3

        @Yveaux Thanks for the quick reply.

        Ah yes I did forget the pull ups. Not use to using them. Anyhow, it made the stand alone RTCLib example work mostly which was just a simple clock program but the Gateway still not working. Not getting the correct date and time from the RTC. I say mostly because the code doesn't seem to report the module not connected from the function rtc.begin() ?

        Steve

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        32

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular