Skip to content

Hello Iam Newbie! I need help for my arduino #21445

Discussion options

You must be logged in to vote

Hy,
why did you draw the connexions that complicate?
For me it seams to be ok, but it can be drawn much simpler.
And with the program I also can’t help much, but it seams, that you ask for low, not for high. If butom is open, input is low, so you have to ask for high, not for low to detect pushing.
Did you finde help in the links?

Try this:

if(digitalRead(4) == HIGH)
d = 1;

if(digitalRead(2) == HIGH)
d = 0;

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants