help with mode changing between loops

I am trying to make a ELS controller (for the hell of it), and wish to have the light mode changed by a rotary selector. The code is bellow, i dont know why its not working and i was sure it would be obvious to more experienced people. All I need it to do is change loops from one mode to another when that input goes high.

Well it actually said that the msg is to long so anyone who wants to look at the code pm your email :confused:

You can attach a file, use that feature for long code.


Rob

Thanks, i didn’t see that option so here is the code.

ELS.pde (6.66 KB)

When asking for advice it helps if you say what it is doing and what you expect it to do, rather than just saying it doesn't work.

const int pin10 = 11;
const int input1 = 0;  //int the pins for the light mode select buttons
const int input2 = 1;
const int input3 = 11;

You can’t use pin 11 for both output “pin10” and “input3”.

You shouldn’t use pins 0 and 1 and also use Serial.begin();

If you need more pins you can use the ‘analog input’ pins for digitalRead() and digitalWrite(). They are called A0-A5 (a.k.a. 14-19).