battery life meter

I posted a topic previous to this one when I began to have issues with this code I’m building viewed here:

I have incorporated the blink without delay coding as suggested in the previous topic. It did improve response time but now led11 does not blink or stay on it is dead(no power at pin 11). Please explain what happened and what i can do to it now!

battery_life_meter.ino (2.31 KB)

long previousMillis = 0;
long LED11Interval = 1000;
long LED12Interval = 500;

Make these

unsigned long previousMillis = 0;
unsigned long LED11Interval = 1000;
unsigned long LED12Interval = 500;

In the future just attach your sketch to your post, see icon image.

2014-11-04_0-01-25.jpg

LarryD:
In the future just attach your sketch to your post, see icon image.

Great image. I have taken a copy of it. I hope you don't mind if I use it in some of my posts.

...R

bwestbrookalivia:
but now led11 does not blink or stay on it is dead(no power at pin 11). Please explain what happened and what i can do to it now!

else
      ledState = LOW;
      digitalWrite(LED11, ledState);
    }

In this piece of code LED11 MUST always be LOW. I wonder did you intend to have the digitalWrite() line outside the }

…R