Arduino duemilanove Pin 13 releasing from default signaling

Hi everyone,

Can we remove default LED blinking on pin 13? My problem is, I need last pin remaining too in my project as all other have been used. Now while programming, resetting board or even attaching any other usb device to laptop pin 13 blinks which activates my relay, this is unwanted behavior.

Can we stop this by any means, I do have another board 2560 which I could use, but I want to remove default blinking. Is it possible?

Thanks

Pin13 is the SCK pin, if you are programming via ICSP that cannot be avoided.

Does D13 going High or Low activate your relay?

Hi thanks for replay,

I am programming via USB. My relay is connected to Pin13(is pin13 and D13 same or different?).

Thanks

When your code refers to 13, as in:
byte pin13 = 13;
or
#define pin13 13
or
const byte pin13 = 13;

that is all referring to D13, which I think is PB5 on a '328.

Could you swap a couple of pins around so the relay is not controlled by D13?

Hi,

Thanks for reply,

I have swapped pins, but isn't this thing need to be implemented?, as in this case I am out of pins and where each pin is important, it shouldn't be taken away like this. I mean its okay to blink an LED but why it is connected to IO pin, or some functionality should be there to separate Just Simple Led Blinking with more important functionality.

Regards

1 Like

Pinr 13 (D13) works as any "normal" digital pin. So you can use it for your relay.
You will see the LED activity when switching relay on/off, but that is ok and it will not cause you problems.
Of course you have to write and upload your program into arduino (which will control your relay).

The only issue you may face were when you would use the "SPI" device connected to your arduino, as the D13 will be then used as one of special SPI signals (clk).

It's most likely coming from the bootloader. You can compile a new bootloader (optiboot) and specify how many blinks you want, or you could just overwrite the bootloader by using a regular programmer or ArduinoISP.

It's most likely coming from the bootloader.

Yes, optiboot (and also the older bootloader ATmegaBoot) will flash the onboard LED a couple of times to show that it's there.
You can build a new bootloader that doesn't flash the LED and burn it on your board, but it's not a completely trivial operation.