Search

Blog Archive

Tuesday, 21 August 2018

HOW TO USE NODEMCU (ESP8266) ON ARDUINO IDE

Thanks to the guys those who ported the Esp8266 into Arduino IDE and helping all the arduino users happy to the core. Yes it's been long time since they did and this post is bit later to thanks the good hearted work by the guys out there.

Lets begin with Installing the Esp8266 support for the Arduino and see how to blink an LED ( the hello world in the electronics )

Firstly open the Arduino IDE

Go to files and click on the preference in the Arduino IDE
copy the below code in the Additional boards Manager

http://arduino.esp8266.com/stable/package_esp8266com_index.json
click OK to close the preference Tab.
After completing the above steps , go to Tools and board, and then select board Manager

Navigate to esp8266 by esp8266 community and install the software for Arduino.

Once all the above process been completed we are read to program our esp8266 with Arduino IDE.














For this example I have used NodeMCU esp8266 and if you are using any other vendor wifi chips or generic wifi module please check with the esp8266 Pin mapping which is very essential to make things works.

The reason why I used D7 pin for this example is , I uploaded the basic blink program that comes with the examples program in the arduino IDE which is connected with 13 pin of arduino. The 13th pin is mapped into D7 pin of NodeMCU.

go to board and select the type of esp8266 you are using. and select the correct COM port to run the program on your esp8266 device.

void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}




upload the program and see the results.

No comments:

Post a Comment