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. can use delay() on an ESP32 gateway ?

can use delay() on an ESP32 gateway ?

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 3 Posters 35 Views 3 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.
  • R Offline
    R Offline
    rumoldus
    wrote on last edited by
    #1

    Hi,
    I started work to connect an AHT10 temp+humidity sensor (I2C) directly to an ESP32 gateway. The AHT10 library readme warns for a compiler message about long delay. And indeed, in the code I found several delay statements that each evaluate to 350 ms! I suspect that this could affect the Gateway functionality, but haven't tested this. I'd rather not change a library (it's coming from github / enjoyneering), but more than that I'd rather not have a internittently malfunctioning gateway. Could the ESP32 not be affected because of multi-core capability or is possibly the delay function under mysensors implemented as a non-totally-blocking routine ? All options that are hard to check for me. Please advise, many thanks in advance.

    mfalkviddM 1 Reply Last reply
    0
    • R rumoldus

      Hi,
      I started work to connect an AHT10 temp+humidity sensor (I2C) directly to an ESP32 gateway. The AHT10 library readme warns for a compiler message about long delay. And indeed, in the code I found several delay statements that each evaluate to 350 ms! I suspect that this could affect the Gateway functionality, but haven't tested this. I'd rather not change a library (it's coming from github / enjoyneering), but more than that I'd rather not have a internittently malfunctioning gateway. Could the ESP32 not be affected because of multi-core capability or is possibly the delay function under mysensors implemented as a non-totally-blocking routine ? All options that are hard to check for me. Please advise, many thanks in advance.

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @rumoldus said in can use delay() on an ESP32 gateway ?:

      delay function under mysensors implemented as a non-totally-blocking routine ?

      MySensors does not override the delay function, so there is no MySensors implementation.

      delay will affect the gateways ability to do stuff. How much is impossible to say, but it is likey to cause problem in random ways that are very hard to troubleshoot.

      1 Reply Last reply
      0
      • electrikE Offline
        electrikE Offline
        electrik
        wrote on last edited by
        #3

        One approach would be to create a separate task on the ESP32 that takes care of testing this sensor, than the gateway is not affected.

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


        24

        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