Binary Clock LED on pin 11

Hi,

I have a problem with my little project. Almoust everything works fine, I have only problem with one LED on pin 11. I am using Arduino Pro mini 16MHz 5V and driving 13 LED's through IO pins on Arduino.
I have problem with LED connected to pin 11 of arduino. It doesnt stays turned on. Code seems to be working because I can see changes every second (LED flickers a bit), also LED flashed during LED init where I turn on/off all the LED's to check them.

Here is the code, I tried removing Serial, powering it through normal usb, swapped LED, almoust everything that came to my mind

BinaryClk.ino (11 KB)

Hi,

dumr666:
I have problem with LED connected to pin 11 of arduino. It doesnt stays turned on. Code seems to be working because I can see changes every second (LED flickers a bit), also LED flashed during LED init where I turn on/off all the LED's to check them.

Can't see anything obviously wrong in the code.

It could be that you have a short between that LED and another one ????

You could try some test code which turns OFF all the LEDs, and just lights that one, then do the same again but turn all LEDS ON and turn that one off.

Yours,
TonyWilk

I gave up, I swaped pins around, and put input button on pin 11. Here is some kind of final code if interested

Binary clock

I found the problem.

In your original code is:

  if (currHour >= 20 && currHour < 24)  {
    digitalWrite(LEDH11, HIGH);
  } else {
    digitalWrite(11, LOW);
  }

odometer:
I found the problem.

Well caught !

Yours,
TonyWilk

Thanks! I never noticed it