Say what?

Would I like to know why this:

if (digitalRead(4) == LOW) {

Randomly triggers as if there’s some unseen demon child hammering a pushbutton on pin 4, however…

int btn;
if (btn == LOW) {

… Always works perfectly?

Yes. Yes I would.

Makes about as much sense as forgetting to trim those extraneously long terminal block pins.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.