I have a new Arduino Uno R3 and I'm a little bit surprised...
Even I let setup() and loop() empty or I call digitalWrite(13, 0) in setup(),
the onboard LED turns on a little bit / sometimes bright if I put my finger on the back of the board or
if I just put the board on my desk.
Can please somebody explain this? Is my board defect or it's a known problem
with capacity?
A little bit more information - the board have a plastic cover on the back. If I put the bord an my desk, the led turn on bright. They turns off slowly, within approx. 1 minute.
Ok, you are right, thank you very much. Configuring the pin as an output solves this issue. But why this do not happen by firmware at initial?
Best regards
I'm not a button nor a led people, but I'm wondering that a simple plastic shield can affect the output state of a pin. Not very secure. You can't read about it anywhere, why? This arduino circuit is a little bit too sensitive, my opinion...
Unconfigured, the LED pin a high impedence, open circuit, and like all of the rest of the pins it is in an undefined state controlled by whatever the external world is imposing on the pins. In this way, an unconfigured chip hooked up to an external circuit won't attempt to force the pins into doing something dangerous, such as if in input pin was jumpered to +5V, and a pinMode(pin,OUTPUT) tried to sink it to LOW.
The Op-amp amplifies the pin 13 high-impedance floating input, so if it was configured as an INPUT or INPUT_PULLUP, you'd see what level the input pin is reflected on the LED.