Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By tytower
#20557 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?
User avatar
By HermannSW
#20580 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.
User avatar
By tytower
#20581 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