-->
Page 2 of 2

Re: Blue LED on ESP12

PostPosted: Tue Jun 16, 2015 12:31 am
by tytower
Thanks . you probably mean drive it low to turn it off.

#define DIGITAL_PIN 1
#define LED_ON digitalWrite(DIGITAL_PIN, 0)
#define LED_OFF digitalWrite(DIGITAL_PIN, 1)
pinMode(DIGITAL_PIN, OUTPUT);

Would pinMode(1, INPUT); do the same?

Re: Blue LED on ESP12

PostPosted: Tue Jun 16, 2015 4:26 am
by HermannSW
Hi,

> Thanks . you probably mean drive it low to turn it off.
>
no, turn LED on by setting pin1 to 0, turn LED off by setting pin1 to 1.

> Would pinMode(1, INPUT); do the same?
>
With OUTPUT you get a bright LED, with INPUT a very dim LED when turned on.

Hermann.

Re: Blue LED on ESP12

PostPosted: Tue Jun 16, 2015 4:38 am
by tytower
So the LED is run via a resistor to source voltage? so making pin high turns off and pin low turns on . Its sinking through the chip

With OUTPUT you get a bright LED, with INPUT a very dim LED when turned on.

That will come in handy for power saving
OK thanks

Re: Blue LED on ESP12

PostPosted: Wed Jun 17, 2015 2:27 am
by HermannSW
From here ("… #LED has three states (off, dim, on) …"):
https://twitter.com/HermannSW/status/579690784871571458

Image

Hermann.