can use delay() on an ESP32 gateway ?



  • 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.


  • Mod

    @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.



  • 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.


Log in to reply
 

Suggested Topics

45
Online

11.2k
Users

11.1k
Topics

112.5k
Posts