Testing arest with A Mega 2560 arduino and ethernet interface connected to homeassistant, i was wondering why the output switches were set up to LOW (ON) at startup.
Reading the code i found that in arest.h there is
// Output
if (state == 'o') {
// Set to Output
pinMode(pin, OUTPUT);
digitalWrite(pin,HIGH);
that set directly LOW the pin state once set it as OUTPUT.
Modified in this way
// Output
if (state == 'o') {
Testing arest with A Mega 2560 arduino and ethernet interface connected to homeassistant, i was wondering why the output switches were set up to LOW (ON) at startup. Reading the code i found that in arest.h there is // Output if (state == 'o') {
digitalWrite(pin,HIGH);
that set directly LOW the pin state once set it as OUTPUT.
Modified in this way // Output if (state == 'o') {
digitalWrite(pin,HIGH);
everything is ok.