using 2 loops

i have to built a project using two loops in single arduino bord.for a example i want to blink led using 13 pin and pin 2,3,4,5 need to get a another to do this.can anyone provide a code for this. :o

thank you

It doesn't sound like you need 2 loops, I believe it's a job using multiplexing. Perhaps you could try searching multiplexing leds for more info.

Have a look at the demo Several Things at a Time - it blinks 3 leds and the concept can be extended easily.


I find it interesting that "those in the know" find things easy, when the same tutorial can be mind-blowingly difficult for some of those "not in the know".

I agree fully with that sentiment and I did think about the use of the word "easily" while I was writing that Post.

I concluded that the more difficult part would be grasping the BWoD concept and I reckoned that once that is clear extending to additional LEDs would be manageable by the OP.

Of course my conclusion may have been wrong. What word would you have used?

And I do appreciate your taking the time to comment on the point.

As for Fritzing or Eagle, I would much prefer newbies to use pencil and paper and apply their brains to their problem rather than fancy presentation. I'm sure it is possible to use Fritzing for something useful - but I have yet to see it in this Forum. I use Libre-Office-Draw myself because I am already familiar with it.


I think this subject should not clutter up the OP's problem. How about moving your comment to the General Discussion section?