Last active
August 29, 2016 21:37
-
-
Save dmiddlecamp/de8c808cdd346fb0189421249b24c672 to your computer and use it in GitHub Desktop.
mac address example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte mac[6]; | |
void setup() { | |
WiFi.macAddress(mac); | |
String macAddress; | |
for (int i=0; i<6; i++) { | |
if (i) { | |
macAddress += ":"; | |
} | |
macAddress += String(mac[i], HEX); | |
} | |
Particle.publish("macAddress", macAddress); | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment