Hello folks!this post is about my hands on with a microcontroller ESP8266.Its a low-cost wifi device.I used arduino an opensource frimware as a SDK(software development kit) to programme a blink operation in LED.Now I gonna give you my protocol.
COMPONENTS NEEDED:
- an ESP8266 MCU
- LED
- a latest version of Arduino IDE
- bread board and some jumper wires
- USB data cable
SOFTWARE PART:
- After completion of Arduino installation,please click Tools option and check for board details.I am damn sure,there will be no ESP8266 modules.so follow the below.
- Click Files option and then select preferences.In preferences window just paste this link http://arduino.esp8266.com/stable/package_esp8266com_index.json and seleck ok.
- Then further click board manager from board.In that type esp8266 and check it.It will show you esp8266 modules.click that and install it.
- Now you are ready to blink a LED.
BLINK:
- Connect the ESP8266 with USB cable to your computer
- In Arduino IDE check for the port.
- Then in the board select node mcu1.0.......
- connect the jumper wires to D7 and LED in the bread board.
- And ground it.
- Now just paste the following code in the IDE and upload it to the ESP8266.
void setup() {
pinMode(D7, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(D7, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(D7, HIGH); // Turn the LED off by making the voltage HIGH
delay(1000); // Wait for two seconds (to demonstrate the active low LED)
}
- After uploading,you can see a blinking LED.
- The below video is my blinking LED folks.
Comments
Post a Comment