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! 😉


Log in to reply
 

Suggested Topics

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts