Help for flashing leds

Hello every body

Can any one help me please
I am making some christmas lights out of led
and plan to have about 12-15 led per chanel and about 10 chanels .
I would like to know if its possible to say have a chasing effect for say 2 minutes , then a blinking effect for 2 minutes and so on . So the light have a bit of variation , if it is possible has any one got a sutable sketch or could any one help me write one.

Thanks Nigel

Arduino can do that specific tasks, however the first step is actually "talking" to the LEDs and making them do anything.

Do you have LEDs?

  • If so,

  • what kinds of chips / LEDs are you using

  • do you have them doing anything now

  • If not

  • getting a script / example that fits your needs and using a similar setup may be good start.

  • have you thought about what LEDs you plan on using?

Thanks for the reply

i intend controling the built led pattern via a relay so im not limited on the power from the aduino

i have found some sketches that chase the led and flash the led but my problem is i woul like a total sequence so the light ar not just flashing the same all the time

How many LEDs do you want to control individually and do you want individual control of every LED in your system?

You say 10 Channels .. what do you mean by that?

It seems he plans on using ~10 relays to control 10 different channels with ~15 leds each.

( To me 10 seems like overkill, If i remember correctly most chasing xmas lights have ~3-5 channels.

Seems fairly simple enough, i wonder what the sound of all the relays randomly clicking will be like lol

My opinion would be to get the hardware part wired up and then move on to writing a basic sketch and improving from there.

Seems fairly simple enough, i wonder what the sound of all the relays randomly clicking will be like lol

you could use some transistors there cheaper than relays and require less wiring.

-james

Thanks for all you replys

I made 10 star shapes about 2ft tall with 17 phirana led in each last year and they look fantastick flashing and chasing allong the roof of the house so definatly not over kill

I have found two sketches one is flashing and one is chasing how can i modifiy them to say repeat 20 times then go on to the next sketch

In your loop, run the routine that does chasing for x number of times .. then run your other pattern x times and so on .. when the loop ends, it will start at the first routine.

void setup(){
  
}

int loopMax = 500; 
//variable in case you want to adjust the times for each one using input mechanism

void runPattern1(){
  delay(100);
}
void runPattern2(){
  delay(100);
}
void runPattern3(){
  delay(100);
}

void loop(){
 
   for( int i = 0 ; i < loopMax  ; i++ ){
    runPattern1();
   }

   for( int i = 0 ; i < loopMax  ; i++ ){
    runPattern2();
   }

   for( int i = 0 ; i < loopMax  ; i++ ){
    runPattern3();
   }
 
}

Thanks a million marklar
That is just what i was wanting i will have a play arround and see if i can work it out