HELP! Passcode enabled blinking LEDs w/ arduino uno

Thread Starter

habarabadabas

Joined Apr 16, 2014
6
we were to do a program where we set a passcode (ex. 1-2-3) in order to activate the blinking of LEDs, and so far we're stumped! the program allows the leds to blink when we press only one key of the passcode (p.s. we are using tact switches as push buttons). we have used counters as an alternatove but still no go. :confused:

here's our code:

View attachment arduinoCode.txt
 

shteii01

Joined Feb 19, 2010
4,644
Your buttons are set as outputs. That does not make sense.
Your LED pins are outputs, you got that.
Your buttons are inputs.
pinMode(pushButton, INPUT);
 
Top