I'am new to this :astonished:
I am hoping that someone can help me.
I have got hold of a Arduino uno r3 dev board, and i'am wanting to make 1 button input to switch 4
different outputs high, and display on a JM164A 16x4 lcd (line1=mic1,line2=mic2,line3=line1,line4=line2) each button press selects the next output in a loop.
I have been looking all over the net trying to find any examples, but not found any =(
You need to look at the button and when it changes from being pressed to not being pressed you increment a counter, and do the following:-
Delay for 25mS for suppressing contact bounce.
Then look at the counter and if it exceeds the maximum value, which in your case is 3 you put it back to zero.
Then you have a switch statement that puts out the appropriate message and set the appropriate bits high while setting the other bits low.
The last thing in the loop is you save the current state of the button in a variable so you can test against it the next time round the loop.
73's de G8HBR - Haslingden
Thanks for the reply, that just went over my head (Hi)
I don't know how to code :astonished: but am willing to learn.
Could you help with a sample sketch that could show me the
basic jest of things ?
73's Howard G7LQY - Bury
Look at the examples in the IDE.
Have a look at this:-
Search in the playground ( on the top left hand bar of this page ) for lots of examples.
Read the reference section under the help menu.
Start by doing the examples, changing them a bit and see those changes work.