Blinking LED separately, high speed

Hi

I'd like to connect and Arduino with a breadbord and 10 pieces of 5mm white standard dome LED, than blink them separately with high speed (microseconds and no delay if possible) I am a beginner - just learning about Ohms and stuff...but need some help. I have "DCcEle DCcduino UNO", breadbord, wires, LEDs. My questions are:

1. How to wire breadbord with Arduino board, which pins to use, how many resistor and what battery?
2. Should I write the code in the same what as I did before with 2 LED? - coding them separatley.
3. Instead of using a standard push button to start the blinking I'd like to use something like a "battery isolator strip or battery pull tab", so a plastic film actually interrupts a circuit and when I pull it out the blinking starts.

Thanks,
Rigo

Have you gone thru the sketches that come with the IDE?

The way you have it in your schematic isn't the same as how you have it wired up!

Where?????

Tom.... :slight_smile:

Use an array for the pins for the LEDs, e.g. int pins[5] = { 2, 3, 4, 5, 6 };. If you have too many LEDs, consider using a shift register and transistors. It should not be complicated, just look at the Blink example and work from there.

How to wire breadbord with Arduino board,

rigo22:
I'd like to connect and Arduino with a breadbord and 10 pieces of 5mm white standard dome LED, than blink them separately with high speed (microseconds and no delay if possible)

You might get some programming ideas from the demo several things at a time.

I wonder what exactly you mean by high speed - if you are talking about flashes of a microsecond duration you are probably not going to get that on a 16 MHz Arduino and you are certainly not going to be able to see them.

Tell us exactly WHAT you want to achieve and not HOW you think it should be done.

...R

Thanks for everybody the hints. I don't need 1 microsecond, just 100 or more. I tried with 2 LED and made long exposure photo with it and it works.
I build a light painting tool, more details I can't tell you, but it is important that the flicker trigger should be not a button but a string.
The link you sent me Robin is not working...

For a 100 microsecond delay, you'd want to do:

delayMicroseconds(100);

Seeing as you want to delay two LEDs separately, I'd recommend using two variables to store the value of micros() and checking if the appropriate amount of time has passed in loop() e.g.

if (micros() - ledTimerA >= 100) { // 100 uS delay
    digitalWrite(ledPinA, ledStateA);
    ledStateA = !ledStateA;
    ledTimerA = micros();
}

if (micros() - ledTimerB >= 200) { // 200 uS delay
    digitalWrite(ledPinB, ledStateB);
    ledStateB = !ledStateB;
    ledTimerB = micros();
}

or something similar

Thanks!
Will test the code as soon as the hardware is built up.

rigo22:
The link you sent me Robin is not working...

Sorry, I have corrected it (I hope).
I am having trouble with the new Forum system - PITA

By the way the code in the demo shows how to do timing without using the delay() function. Also, the demo uses millis() but the exact same technique works with micros().

...R