0

How to work on Nodemcu

Spread the love

Nodemcu is system on chip with esp8266- 12 E wifi module. Nodemcu used to provide internet connectivity. By programming in Arduino IDE we can distinguish input and output functionality according to our need.
We can send our data cloud server using various protocols. Nodemcu have in build wifi access and microcontroller.

Nodemcu Board package install in Arduino IDE

Now, you need to take a follow steps to be able to configure the ESP8266 with the
Arduino IDE:
1. Start the Arduino IDE and file > Preferences window.
2. Enter the following URL into the Additional Board Manager URLs field:

http://arduino.esp8266.com/stable/package_esp8266com_index.json

preference


3. Open Boards Manager from the Tools | Board manager menu and install the esp8266
platform as shown here
esp8266

4. After installing the package select your board as Nodemcu (ESP-12E) module.

5. Than start Programming in Arduino IDE

Basic programming for Nodemcu


#include
constchar* ssid = "your_wifi_name";
constchar* 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() {
}

In serial monitor output is shown as:-

WiFi connected
192.168.1.123

Pravesh Kumar

Leave a Reply

Your email address will not be published. Required fields are marked *