My basic question is how can I convert the units MAC address (from ESP.getEfuseMac() and/or WiFi.macAddress() ) into a string?
I'm pretty sure that someone is going to say, "Why are you doing this? You shouldn't use a string." So here's my situation:
My Arduino (technically an ESP32) sends some json data to my MagicMirror using HTTP POST. The code for sending the data is:
int returnCodeMagicMirror = clientHTTPMagicMirror.POST( postAttributeFirmware + firmwareCode + postAttributeEfuseMac + efuseMac + postAttributeWiFiMac + wifiMac + postAttributeSensorID + sensorID + postEnd );
String payloadMagicMirror = clientHTTPMagicMirror.getString();
I'm no expert, but I believe this is concatenating a bunch of string to form the post. Unless someone can suggest another workaround, I think I need efuseMac and wifiMac to be strings as well.
I found one possible lead with this code (MAC Address to String - #6 by beic - Programming Questions - Arduino Forum) but I don't understand it well enough to know how to adjust it to input ESP.getEfuseMac() and get out a string called efuseMac.
Any help or pointers in the right direction would be appreciated.