Message during setup() doesn't work in version 2.0.x
-
Hello all,
I tried to convert the sketch from my relay node to the new version 2.0.x. In the setup() routine I set the state of the relay to off and sent the state to the controller. In version 1.5.4 worked this without problems. Now with version 2.0.0, it doesn't work anymore. It seems, that the node starts working just after setup() routine. Is there another possibility to run this command once after note setup/startup?
Regards
spacejay
-
@spacejay Start your loop() code like this:
void loop() { static bool first = true; if (first) { // .. Your code that should only be executed on first run .. first = false; } // .. your normal loop-contents .. }
-
-
-
@spacejay it's always hard to judge a user's experience level. Anyway, great you created a workaround and can continue!