I am trying to use this template that I have found. It is meant to be used with the LCD shield that comes with the buttons already attached to it. When I look at the code, to me it looks like there is only variable or pin assignment for one button. Shouldn't I need 4? I want to have up down select and back which I am pretty sure is the same button layout that the LCD shield has that this sketch is written for. Thanks.
LCD_Shield_Menu.ino (14 KB)
Don't attach .ino files. No one wants to download and try to open them just to help you. Put the code into your post using code tags.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Thanks.. Tom...
Hi
It sounds like the code was written for the 16x2 LCD display with the buttons arranged as a potential divider.
Each button caused a different voltage output, which the analogRead would convert to a variable representing which button was pushed.
The circuit is like this.
If you want discrete buttons, you could wire a button to each of a digital input of your Arduino.
Tom...
TomGeorge:
Hi
It sounds like the code was written for the 16x2 LCD display with the buttons arranged as a potential divider.
Each button caused a different voltage output, which the analogRead would convert to a variable representing which button was pushed.
The circuit is like this.
If you want discrete buttons, you could wire a button to each of a digital input of your Arduino.
Tom...
Oh ok thank you very much for this. I dont care about having the buttons each be on their own pin... so alternatively, could I just wire the buttons as shown in the diagram you provided? They all go to analog pin 0 but with different value resistors right? I will give it a try so if you dont have time to respond it is ok. And thank you very much for helping. Clearly I am new here and the other comments are just that which would normally cause someone to get discouraged and give up. God forbid it is a young child coming and asking for help. People like Johan_Ha will make them never return,. Thanks again.