Hey Guys, today I created a program for a Arduino for a simple memory game.
Here is what you need to have:
Red LED
Green LED
Blue LED
Yellow LED
4 Regular Buttons
A bunch of wires
An Arduino UNO
A programming cable
A computer to program
Here is the hookup:
Buttons:
buttonRed = 2;
buttonGreen = 3;
buttonBlue = 4;
buttonYellow = 5;
LED:
ledRed = 6;
ledGreen = 7;
ledBlue = 8;
ledYellow = 9;
Make sure you have ground for both button and each LED.
Don't worry about adding resistors, because all four LED's in the wiring are enough.
Here is the code:
Comentários