How can I create 4 cases out of one analog input??

Hi!

It's maybe a simple question but I can't figure it out: I have four transistors driving 4 different banks of leds. I have one potentiometer hooked up to the analog input A0. I want to switch through the colours as I sweep the pot. So e.g. 0 - 255 = Transistor 1 high, others low, 256 - 511 Transistor 2 high, others low and so on.

Thank you so much for your help!!!

basically:

void loop(){
potvalue=analogRead(A0);
if (potvalue>=0 and potvalue<=255){digitalwrite (LED1, High (assuming High - on);}
else {digitalwrite (LED1, Low (assuming High - on);}

repeat for 255-511,512-767, 768-1023 or as you see fit
}

flesh out variable names & stuff ...

Ok, super! Great! A thousand thanks for that!!!

And get the syntax right in the if statement.