wait microseconds available?



  • I see from the API that wait() is preferred over delay(). But what about delayMicroseconds? Is it OK to use 'delayMicroseconds' for very short durations or is there a 'waitMicroseconds' function that is supposed to be used?


  • Hardware Contributor

    @skywatch wait() is prefered because it will process MySensors library tasks (including checking for incoming messages) instead of blocking all the processing.
    For very short tasks it's fine to use delayMicrosecond(). A "wait" version would make no sense as processing of MySensors would probably take more time than the duration you ask.



  • @Nca78 That makes perfect sense! - Thanks for the clarification.....Onwards and upwards! 😉


 

432
Online

8.0k
Users

8.8k
Topics

94.3k
Posts