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?
-
@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!
1 out of 3
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
PJON and Minicore not working
Development • 21 days ago • Trand 21 days ago