Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output pin set to low at startup #289

Open
nicolapappagallo opened this issue Sep 2, 2020 · 0 comments
Open

output pin set to low at startup #289

nicolapappagallo opened this issue Sep 2, 2020 · 0 comments

Comments

@nicolapappagallo
Copy link

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') {

  // Set to Output
  pinMode(pin, OUTPUT);

digitalWrite(pin,HIGH);

everything is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant