Led program file

Hi, I would like to know if it's possible to write a program for the Arduino to do the following.

  1. Run 10 LEDs (5 groups of 2)
  2. Fire 1 group at a time at random (must be random)
  3. Have the ability to change the duration between lights being fired
  4. Have the ability to change duration lights are lit OR have lights set that a momentary switch is the only way to shut off and move on to next set.
  5. Be able to start this program with a momentary or spst switch and auto off after a programmed time.

Well, after reading this, it looks way more complicated than it was in my mind. Those of you that play with stuff, is this dream achievable?

Thanks Bryan

Certainly can be done in a number of ways. If you are looking to drive the LEDs directly, then you could look at MultiBlink (in my library site, link below). You can change the data table to be 'random' values when you want to run the lights.

Alternatively look at the serially interface LEDs that come in strips. You can turn these on individually and they will stay on until you turn them off. You can run hundreds of LEDs this way.


These LEDs. What is their forward voltage & maximum current? If unknown, what color and size are they?

What current do you need for your desired level of brightness? You can experiment with different series resistors to find the right level.

What Arduino are you proposing to use?

Should the leds always light in pairs? Should they blink on/off or must they fade?

With all due respect to Marco_c, I personally would not use a library for something like this.


@PaulRB. Multiblink is not a library but a data driven sketch to do multiple independent blinking LEDs patterns simultaneously - change behavior by changing the data, not recoding the sketch. It is just hosted at my library site for convenience, so maybe that is confusing.

Your questions are still relevant, though, but I would assume (maybe incorrectly) OP knows how to connect one LED or at least has run the standard example blink sketch.

Hi @marco_c, I was trying to establish if pairs of leds could be run off the same pin, in series (Vff <= 2V) or parallel (current <= 15mA per led).

The OP does not need to blink leds simultaneously (except that the pairs blink together).