NODEMCU Tutorial onboard LED test

Source: Internet
Author: User
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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.