Open landret opened 2 years ago
This is a well known behavior of the classic AVR hardware. The pins default to INPUT mode if not configured with pinMode(), and when in that mode, writing to the output enables/disables the internal pullup resistor (which is normally accessed by pinMode with INPUT_PULLUP).
If you add pinMode(13, OUTPUT), you will see the LED is much brighter. When driven only by the weak internal pullup resistor, the LED still works but is quite dim.
Again, this is a well known behavior of the older AVR hardware. It is not a software bug.
Hi, pin 13 is unexpecteadly initialized as output. This code shows that the on board led on pin 13 blinks, without the pin being set as output in the code.