get macid of nodemcu code example
Example: how to get MAC id of nodemcu
#include <ESP8266WiFi.h>
const char* wifiName = "circuits4you.com";
const char* wifiPass = "your_password";
void setup() {
delay(10);
Serial.println();
Serial.print("ESP8266 MAC: ");
Serial.println(WiFi.macAddress());
Serial.print("Connecting to ");
Serial.println(wifiName);
WiFi.begin(wifiName, wifiPass);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
}