String macAddress()
/*Code:
#include <ESP8266WiFi.h>
setup()
{
//Your code
String MAC_ADDR = WiFi.macAddress();
Serial.print("MAC Address: ");
Serial.println(MAC_ADDR);
}
*/
Explore... Chat... Share...
Moderator: igrr
saltdog wrote:This is a slightly prettier way of doing thingsCode: Select all#include <ESP8266WiFi.h>
uint8_t MAC_array[6];
char MAC_char[18];
void setup() {
Serial.begin(115200);
Serial.println();
WiFi.macAddress(MAC_array);
for (int i = 0; i < sizeof(MAC_array); ++i){
sprintf(MAC_char,"%s%02x:",MAC_char,MAC_array[i]);
}
Serial.println(MAC_char);
}
void loop() {
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]