Arduino Deumilanova very slow

Testing this program, you have to wait ~4 seconds before you can toggle it on/off again. Do I have a defective unit?

Its from this: http://www.youtube.com/watch?v=_LCCGFSMOr4&feature=relmfu He is able to quickly toggle the LED on and off, which I cant because you have to wait 4 seconds. And if you hit the switch before 4 seconds, you have to wait an additional 4 seconds. I am using the on-board LED for this test.

int switchPin = 8; int ledPin13 = 13; boolean lastButton = LOW; boolean currentButton = LOW; boolean ledOn = false;

void setup() { pinMode(switchPin, INPUT); pinMode(ledPin13, OUTPUT); }

boolean debouncer(boolean lastState) { boolean current = digitalRead(switchPin); if (lastState != current) { delay(5); current = digitalRead(switchPin); } return current; }

void loop() { currentButton = debouncer(lastButton); if (lastButton == LOW && currentButton == HIGH) { ledOn = !ledOn; } lastButton = currentButton; digitalWrite(ledPin13, ledOn); }

I just did another test. When I provide a brief input to pin 9 (from the onboard 5v), led on pin 13 stays lit for 10 seconds. I believe the program is supposed to light the led 13 only when there is 5v input to pin 9. Do I need to warranty this unit?

Here is the code-----

int ledPin = 13; int switchPin = 9; int digitalSwitch = 0;

void setup() { pinMode(ledPin, OUTPUT); pinMode(switchPin, INPUT); }

void loop() { digitalSwitch = digitalRead(switchPin); digitalWrite(ledPin, digitalSwitch); }

And another test: It successfully passed the Loop-back test

Steelmesh: I just did another test. When I provide a brief input to pin 9 (from the onboard 5v), led on pin 13 stays lit for 10 seconds.

Then what happens it shuts off and never turns back on again?

I ran out to radioshack and got the exact parts in the video now it works.

Apparently you can't directly jumper 5v from the power-source to any of the digital input pins, because it just doesn't work.

I still don't get why it was acting very odd, why wont 5v at the input pin, no matter where the 5v came from, act like a 5v input signal?

Errrrrrrr, no pull down resistor? lol ty

@6:40 http://youtu.be/abWCy_aOSwY