1

I am making a game where four different colored LEDs are flashing randomly, and when the green LED lights up, the user presses a button. If the user pushes the button when the LED is green, I want my 16x2 LCD screen to record points. And when the user presses the button on the wrong LED, i want the LCD screen to start over at "0 points."

Can you give me some place to start on a code that will feed "data" from each time the button is pushed to the LCD screen?

  • Welcome to Arduino SE! Could you please explain further what have you triedand did the examples work that are included with the LCD library? – Avamander Mar 26 '16 at 23:04
1

You need an example that shows you how to right to a screen and an example that shows you how to detect a button press, also you need to be able to light LEDs. These are all examples supplied with the Arduino IDE, are you using that? Look at each example in turn, setup the circuit get to understand them, then disect them and understand how they work and can get them to do what you want.

Button presses can be trouble some, you may need to investigate denouncing, either software or hardware.

Hope that gives you a starting point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.