The flashing works perfect now. Thanx.
The only thing left is the code buttons.
Here is the current code
void updateRouteNumber() {
for (byte n = 0; n < numCodeButtons; n ++) {
if (route == 0) {
if (digitalRead(codeButtonPin[0]) == HIGH) {
route = 10;
Serial.println("Route = 10");
delay(50);
}
else if (digitalRead(codeButtonPin[1]) == HIGH) {
route = 20;
Serial.println("Route = 20");
delay(50);
}
else if (digitalRead(codeButtonPin[2]) == HIGH) {
route = 30;
Serial.println("Route = 30");
delay(50);
}
else if (digitalRead(codeButtonPin[3]) == HIGH) {
route = 40;
Serial.println("Route = 40");
delay(50);
}
else if (digitalRead(codeButtonPin[4]) == HIGH) {
route = 50;
Serial.println("Route = 50");
delay(50);
}
else if (digitalRead(codeButtonPin[5]) == HIGH) {
route = 60;
Serial.println("Route = 60");
delay(50);
}
}
if (route > 9) {
if (digitalRead(codeButtonPin[0]) == HIGH) {
route + 1;
Serial.println("Route + 1");
}
else if (digitalRead(codeButtonPin[1]) == HIGH) {
route + 2;
Serial.println("Route + 2");
}
else if (digitalRead(codeButtonPin[2]) == HIGH) {
route + 3;
Serial.println("Route + 3");
}
else if (digitalRead(codeButtonPin[3]) == HIGH) {
route + 4;
Serial.println("Route + 4");
}
else if (digitalRead(codeButtonPin[4]) == HIGH) {
route + 5;
Serial.println("Route + 5");
}
else if (digitalRead(codeButtonPin[5]) == HIGH) {
route + 6;
Serial.println("Route + 6");
}
}
}
}
then if route = 14 itll do one thing.
and so on...
I just need to get to that number. Right now if route =0 and i press button 1 the serial display shows
route=10;
route +1;
and it wont process the second push.
Thanx
Harrison