Get the WiFi MAC address of ESP32 Module, using Arduino core for ESP32.

preview_player
Показать описание
In this example, I just want to know the MAC address only, without connect to any hotspot, so no ssid and password needed.
Рекомендации по теме
Комментарии
Автор

The only problem i've seen with this code so far is that if the MAC variable has a leading zero, for example "24:0A:C0" it will omit the 0 on 0A to give "24:A:C0". Very annoying...

SO - I would suggest using the following instead of doing Serial.print() for each point of the array one by one, use this for loop to save time, memory, and leading zeros!

for (int i = 0; i < 6; i++) {
if (i) Serial.write(':');
if (mac[i] < 16) Serial.write('0');
Serial.print(mac[i], HEX);
}

jasonm.
Автор

How do you get the mac address of other wifi networks in the area.

evanfelthman
Автор

Hi, I like your tutorial. Can you please answer. I want to control rgb addressable leds APA102 with ESP32 through wifi using arduino core. Is this is possible? can you please provide me the tutorial?

sajeelahmed
Автор

this this really cool.. good job!!!! i also did an arduino related tutorial... could you check it out and tell me what you think, thanks

riseoftechk