kakopappa / arduino-esp8266-alexa-wemo-switch

Amazon Alexa + WeMos switch made with Arduino D1 Mini
https://sinric.pro
MIT License
281 stars 249 forks source link

Initialize in the "On" state #17

Closed dougstrickland closed 7 years ago

dougstrickland commented 7 years ago

Currently the switch is initialized in the Low or Off condition. How difficult would it be to change it so that when the software starts, the relay is On by default?

kakopappa commented 7 years ago

Just add

digitalWrite(relayPin, HIGH); // turn on relay with voltage HIGH

At the end of setup() { ......... digitalWrite(relayPin, HIGH); // turn on relay with voltage HIGH }

On Thu, Mar 2, 2017 at 1:01 AM Doug Strickland notifications@github.com wrote:

Currently the switch is initialized in the Low or Off condition. How difficult would it be to change it so that when the software starts, the relay is On by default?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/AHIM5sMysfcOdjJuRJAHHoNhf0VSYM8aks5rhbJ1gaJpZM4MP_-Q .

dougstrickland commented 7 years ago

Of course, don't know why I didn't think of that! Thanks!