why led 13 turns on? (i don´t use it in the Sketch)

Hello i have made a sketch enabling DS3231 for 1hz, it works for me i don´t know if it is a good way to make code for ds3231 i already posted it on another thread, but in this case in my sketch i don´t use led at pin 13 and it turns on gently: see video please (when i upload sketch ):

here is the code:

#include <Wire.h>
int ds3231_address = 0x68;
int segundo=0;
const byte pulso=2;
void setup()
pinMode (pulso, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(pulso), control, RISING);

void loop()


void control()

From https://forum.arduino.cc/index.php?topic=456494.0, pin 13 will be active during bootup.

also see : https://arduino.stackexchange.com/questions/1448/whats-the-deal-with-unos-pin-13-led

On a real Uno (and possibly on a number of clones), the LED is driven from the microcontroller using an opamp. If pin 13 is configured as an input (which should be the case after the bootloader has finished its job), it's a high impedance pin and the opamp sees a high level (not quite sure why, I think that it picks up noise from the environment) and hence the LED is on.

Except for real Unos, I have a SparkFun Redboard (legal Uno clone) which does not have the opamp. The LED is not on after a reboot because the high impedance pin (and the noise on the pin) can't deliver enough current to switch it on.

If you need a software solution, set the pin to output in your setup()


// Edit Just wrote a little test sketch for an Uno; it does not seem to be noise and hence the only conclusion that I can draw is that the opamp acts as a pullup resistor.