Go Down

Topic: What would cause the delay in turning on the LED? (Read 527 times) previous topic - next topic

domiflichi

Hi,

I don't know why there is such a delay in my Arduino executing code. On my actual Arduino Duemilanove board, it turns the LED on instantly when I supply power to the Arduino Duemilanove board. However, on my standalone circuit, as you can see in the video, it turns on real briefly, then turns off for a couple seconds, then finally turns on.

Video demonstration:

http://www.youtube.com/watch?v=avOld2PmkW8


As you probably can tell, the larger LED to the left is connected to power directly, not the Arduino chip. And sorry for the blurriness.

Do I have the capacitor hooked up right?

The reason I'm asking all of this is because my next project is going to require instant code execution upon power being supplied to my circuit.

Oh, here's the sketch just to show how simple it is:

Code: [Select]

#define LED 13  // LED connected to
                // digital pin 13
               

void setup()
{
  pinMode(LED, OUTPUT);  // sets the digital
                         // pin as output
}


void loop()
{
    digitalWrite(LED, HIGH);  // turn the LED on
}

shelleycat

1  Is is the bootloader - perhaps you could modify it, or program without a bootloader
2  You have nothing connected to the reset - I thought there is supposed to be a pull up.

MarkT

This is the standard 1 second bootloader delay - I would expect the Duemilanove to do this too unless a non-standard bootloader is installed on it.  Perhaps you have optiboot on it?
[ I won't respond to messages, use the forum please ]

Go Up