Wait() or delay()
-
Yes.
Waiting using the Arduino delay() command is not a good idea. It halts all MySensors processing and should be avoided. Instead you should use the provided wait function which calls process() while waiting.
For details, scroll down to the headline "waiting" on http://www.mysensors.org/download/sensor_api_15
-
I take it, its better to use the wait(xx) function in my sensor program over the delay(xx);??
-
A reason for asking, is that delay() is used in a number of examples... these should all be changes to wait()..
wait() is never used in any of the examples...also, process() is NOT uses in any examples, this should be added to the loop function as a proper way to implement a loop...
-
Yes, still found in a couple of examples. Should be removed (unless they are used because no messages should be processed).
In 2.0 you shouldn't need to call process yourself. It is handled by the library.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login