This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So what I'm trying to do is have my code only activate an LED IF another LED is on. if the other LED is off, the LED won't change.
Here's my code. The buttonState is waiting for a button press. I need the "digitalWrite(go, HIGH); to only happen IF the LED(stby) is also HIGH.
buttonState = digitalRead(goin); if (buttonState == HIGH) { digitalWrite(go, HIGH); } else { digitalWrite(stby, LOW); }
I hope i'm making sense. I'm newer to this and i'm overall not sure how to explain. Let me know if more info is needed.
Subreddit
Post Details
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/arduino/com...