// Including the WiFi library
#include <WiFi.h>
void setup() {
Serial.begin(115200);
// Put ESP32 in Station Mode
WiFi.mode(WIFI_MODE_STA);
// Delay of 1 sec (reason written in loop)
delay(1000);
// Printing the MAC address
Serial.print("MAC address : ");
Serial.println(WiFi.macAddress());
}
void loop() {
/*
While executing the code without the delay,
it is possible that Serial Monitor will show the MAC address to be 00.
This is not correct.
To rectify this, add the 1 sec delay after putting the esp into Station mode
*/
// MAC address noted on 7/11 : 24:0A:C4:00:01:10
}