Abstract

We all familiar with blinking LED using Arduino boards as this is the fundamental step towards using a new development board. In this tutorial, we are going to learn basic built-in commands of Arduino IDE which will help to blink LED using ESP8266 NodeMCU and ESP-01 module. If you wonder how to install Arduino IDE to interface with ESP8266. First we will see how to connect an external LED with NodeMCU and how to blink it using GPIO pins of ESP8266 NodeMCU. After that we will see how to blink an on board LED of NodeMCU and at the end of this guide, we will see how to use GPIO pin of ESP01 to control light emitting diode and how to program ESP01 with FTDI device. The software implementation of the PWM generation in ESP8266 is very similar to that in Arduino. Since we are using the Arduino IDE to program the ESP8266, the function responsible for producing PWM Signal is analogWrite (the same function which we have used in Arduino as well).analogWrite function takes in two parameters: Pin number and PWM Value. In place of Pin Number, enter the number of the Pin through which you want use the PWM Output. Coming to the PWM Value, here you need to enter a value based on the resolution of the PWM. In case of Arduino, the resolution is 8-bit, so you would have to enter a value between 0 and 255.In case of ESP8266, the PWM in ESP8266 uses a 10-bit resolution. So, you will have to enter a value between 0 and 1023. Here, PWM value “0” means 0% duty cycle and PWM value “1023” means 100% duty cycle. Any value between 0 and 1023 will make the duty cycle

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call