Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Stévanovich
#41746 Hello,
As i always found on web, for turn on blue LED i have to use GPIO2 , but, i have to use it for an output, so
Is it possible to turn blue wifi led ON, without use GPIO2 ?
Thanks
Best regards
--------------------
I change the title
User avatar
By Stévanovich
#57398 I found some informations about it .
What i understand is that it can be possible , but i have to change TX/RX pin assignment.

LED Pin

GPIO1, which is also TX, is wired to the blue LED on many devices. Note that the LED is active low (connected to Vcc and sinks through the chip to ground) so setting a logical value of 0 will light it up. Since GPIO1 is also the TX pin, you won't be able to blink the LED and perform Serial communications at thew same time unless you switch TX/RX pins.


Have read this :
http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations

But i cannot realy know how to ....

Is somebody have tried and success with this ?
Thanks,
Best regards.
User avatar
By mrburnette
#57651 Different "boards" have the onboard LED on different ESP8266 connections, for example on my NodeMCU board by Lolin, the LED is on:
Code: Select allint LED = 2;                            // NodeMCU by LoLin

void setup() {
  pinMode(LED, OUTPUT);
}


So, the little code above identifies the LED by pin number and the mode of the pin is set to "output" so the voltage to the LED can be turned on and turned off.

The command to turn the LED on or off can simply be in the loop() part of the sketch:
Code: Select allvoid loop(){
     digitalWrite(LED, !digitalRead(LED));
     delay(1000);
}


or the command can come in from over the "air"; that is, from a browser connected to the ESP8266 being used as a webserver like in my AJAX sketch here:
https://www.hackster.io/rayburne/esp8266-webserver-using-javascript-and-xml-aa78f1

There are many, many techniques to control the LED, the most simple being POST .... when you installed the Arduino core for the ESP8266, a number of examples were also installed. You should look these over and learn some of the web techniques.

Ray
User avatar
By Stévanovich
#57676 Hello Ray,
Thanks for your reply.
I know that my onboard wifi led is GPIO1 .
But GPIO1 is also TRX ...
So when i try to blink GPIO1 , i think there is a mistake with TRX, Blue Led still ON, but my ESP freeze while about 5 seconds , then reboot itself.
I do not understand how to change TRX pin .

Is there a tutorial to do it ?
Thanks
Best regards.