On the board of NODEMCU, there is the other LEDs what can be tested.
1. First LED
Through the PCB file of NODEMCU (see Figure-1 or Https://github.com/nodemcu/nodemcu-devkit-v1.0/blob/master/NODEMCU_DEV Kit_v1.0.pdf), we can find the first led which connected by GPIO16 and vdd3v3. The index of PIN is 0. (see another article of mine: "The operation and Map of Nodemcu"). By executing the Code Block-1 can light it. 2, Second LED
By reading the circuit design schematic of ESP8266 (Figure-2), we can see the LEDs connected by GPIO2 and VDD3, which ' s pin Index is 4. Executing the Code Block-2 can light it.
—————————————————————————————————————————
The above is practicing English writing, welcome to spit Groove. There are two LED lights on the NODEMCU board for our testing. 1, the first led
Through the NODEMCU PCB circuit diagram file (Figure-1 or reference official document Https://github.com/nodemcu/nodemcu-devkit-v1.0/blob/master/NODEMCU_DEVKIT_ V1.0.pdf), we can find the first led, both ends connected to the 3.3V voltage and the GPIO16. Against my other article, "NODEMCU Gpio operation and pin mapping" can be traced to the PIN number 0.
The following figure is a schematic diagram of the NODEMCU part of the circuit Figure-1:
Execute the following code to lighten it.
Code Block-1: [JavaScript] view plain copy gpio.mode (0,gpio. OUTPUT) gpio.write (0, Gpio. Low)
Off: Gpio.write (0, Gpio. High)
2, the second led
Refer to the circuit schematic diagram of ESP8266, the LED is connected to 3.3V voltage and GPIO2, the corresponding PIN number is 4.
The following figure is a schematic diagram of the ESP8266 part of the circuit Figure-2:
Execute the following code to lighten it.
Code Block-2:
[JavaScript] view plain copy gpio.mode (4,gpio. OUTPUT) Gpio.write (4, Gpio. Low)
Off: Gpio.write (4, Gpio. High)
"Reprint please indicate the source :http://blog.csdn.net/leytton/article/details/51650082"