I just got my first Arduino board, the Duemilanove with a ATMEGA 328 chip. I’m powering the board from my PC via USB.
I’ve done all the basic stuff, LED’s, etc. But when I try to test some of the logic functions I can’t get them to work right. The code I wrote is:
val = digitalRead(input);
I’ve been running this with the LED going from pin 13 to the ground and a wire going from the +5V pin to pin 10. The program works as I intended, turning the LED on when the voltage is applied to pin 10.
However, when I REMOVE the voltage from pin 10, the LED stays on for a while, ~ 10 seconds. Is this a coding mistake, a hardware mistake, or what? I can’t belive there isn’t a better way ><