It's great but I would like to know how to make a simple game using only the keypad and lcd. If anyone could help me with this that would be great!

Thanks for the help!

@ldar2020,

Games? The learning curve may be steep.

Suggest you Google for: nokia 5110 arduino game

Then try and find the source for one. At that point, determine how to integrate your keyboard into the game.

Small steps. Use other's code to jump start your knowledge. Learn. Experiment. Post your finished project to help another. Here is my 5110 contribution: http://forum.arduino.cc/index.php?topic=169826.0

Ray

Thank you for the response. I have done what you suggested and found code for a pong game which I modified for my shield. The only problem is that it uses potentiometers as controls. I am stumped as how to replace it with buttons. Is there any way to do this? Physically or with code?

Thanks for the help

what suggestion, what pong sheild

please complete a thought for those just chiming in the middle of a conversation, but on a totally new thread

I am stumped as how to replace it with buttons. Is there any way to do this? Physically or with code?

Consider that a Variable Resistor (Pot or Potentiometer) works via an Analog pin and returns an integer value from 0 to 1023 (often this is scaled to suit). So... if you used two ports, one per two switches OR four ports one per four switches, you could increment & decrement variables (two in the case of 4 switches.) This would give you count UP, count DOWN, count LEFT, count RIGHT.

Assuming that the above is satisfactory, the implementation of the 4 buttons should include debouncing, checks for ceiling and floor (upper number and lowest number, such as 1023 to represent fully right and 0 to represent fully left OR if the center of the screen is (0, 0) then you are going to have to scale the button pushes appropriately.

So, yes, digital push buttons can represent the value returned by a Pot, but you are going to have to implement the context since I have (nor wish to have) any notion of how the selected game works internally. This is usually where many people get frustrated; they are unable to ask specific details on implementation. Were I to embark on what you are doing, I would dissect the existing code and document such things as how the two (or more) position variables were utilized by the original author. You may want to actually prototype the original circuit. Once you understand the original code, start improvising ... a set of buttons (X or Y) at a time. If you need coding help at this point, post a specific question. You may also want to begin a simple sketch that uses 4 buttons, 2 for X and 2 for Y and simply display these two numbers on your LCD. So, pressing the Up button would increment X and pressing the Down button would decrement X. Same with Y. Now, think about that (0, 0) issue ... where is the game center? It is often in the center of the screen, but it does not have to be! For example, (0, 0) could be in the lower left corner... think about it... this would make the entire screen positive X, Y values.

Again, good luck,

Ray

Ok. That clears up most of my problem. I have duplicated the original circuit exactly as it was meant to, and will now try to (in a new thread) figure out the code.

Thanks for all the help and support