Arduino setup runs when relay activates

No; you can use any sequence. In this case, it prevents the pin from going LOW when switching the pin to output.

1 Like