-->
Page 3 of 4

Re: Issues with onboard blue led on esp8266-01

PostPosted: Mon Jul 02, 2018 1:21 am
by Pablo2048
Well if you are using ESP-01 the LED is connected to TXD so it's obvious, that you can not control it after Serial.begin() :-)

Re: Issues with onboard blue led on esp8266-01

PostPosted: Mon Jul 02, 2018 7:30 am
by tplindley
I have a simple example that shows the problem. In the following code, if I comment out the Serial.Begin() the code works fine. If I leave it in, the led will not blink.

Code: Select all#include <Arduino.h>

const short int _led = 1; //GPIO1
const short int _led2 = 16;

void setup() {
    // put your setup code here, to run once:
    pinMode(_led,OUTPUT);
    pinMode(_led2,OUTPUT);
//    Serial.begin(9600);
}

void loop() {
    // put your main code here, to run repeatedly:
    while(true)
    {
        digitalWrite(_led,LOW);
        delay(1000);
        digitalWrite(_led,HIGH);
        delay(1000);
    }
}

Re: Issues with onboard blue led on esp8266-01

PostPosted: Mon Jul 02, 2018 7:40 am
by Pablo2048
Yes, it's as I said - GPIO1 is TXD and BOTH LED GPIO on ESP-01 - see http://blog.circuits4you.com/2016/03/un ... -pins.html ...

Re: Issues with onboard blue led on esp8266-01

PostPosted: Mon Jul 02, 2018 10:56 am
by tplindley
Pablo2048 wrote:Yes, it's as I said - GPIO1 is TXD and BOTH LED GPIO on ESP-01 - see http://blog.circuits4you.com/2016/03/un ... -pins.html ...


Bottom line then, I can't use the serial port for diagnostic output if I want to also use the on-board blue led. Correct?

Thanks very much for your help.