Advertisement

header ads

How to start programming ESP 8266 with Arduino IDE


ESP 8266 is one of the most widely used SoC in IOT based projects today because of the low cost and high performance. But sometime you will face problems when it comes to programming the chip. Most of the times people tend to use a complex software called "esplorar" with the language "lua". But it will be very useful if we can programme it with a familiar software. Yes we can. We can programme ESP 8266 using Arduino IDE which is very popular. In order to do that, we have to make some configurations in the Arduino IDE . In this tutorial we will discuss on how to start programming ESP 8266 using Arduino IDE.

ESP 8266 Node MCU Developer board Pinout

Install ESP 8266 compatible Arduino IDE


  • Go to this link and download Dedicated Arduino IDE for ESP8266 and install.

(Note: You can use this Version of Arduino software for other projects too. This is just a Usual Arduino Software with ESP8266 libraries)

Now You are ready for programme ESP 8266 from Arduino IDE.💪

Test Code for chech Wi-Fi connectivity of ESP 8266 module.

HArdware Needed


  • ESP 8266 SoC.

It is better to buy a USB compatible ESP module.


Download and Install drivers from HERE.(If it has CH340G chip, Otherwise read the product details and google it to find drivers.😜)

Configuration


  • Connect your ESP module to the PC via USB.

(Note : If you are note using USB compatible Node MCU module. You have to power up your module with 3.3V Vcc and Tx Rx connections. Follow this link to see the connections.)


  • Open Arduino IDE and set configurations as follows


(Port will be detected Automatically after connecting the ESP module to the PC and drivers are properly installed. Change the device to your model accordingly.)


  • Then Copy and paste Following sketch and Upload to the module.

(Replace ""your_wifi_name" with your wi-fi router name and "your_wifi_password" with the actual password)



// Import required libraries
#include <ESP8266WiFi.h>
// WiFi parameters
const char* ssid = "your_wifi_name";
const char* password = "your_wifi_password";
void setup(void)
{
// Start Serial
Serial.begin(115200);
// Connect to WiFi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Print the IP address
Serial.println(WiFi.localIP());
}
void loop() {
}


  • Then  turn your relevant Wi-Fi router on if not.
  • Then upload the sketch to the ESP module


  • Now access to the router and check connected devices. It must show your ESP module as a connected device.


That's all for this tutorial, and see you next time with a bit advanced ESP based tutorial. Share this with your friends and like our Facebook page for learn more cool stuffs.

Post a Comment

0 Comments