System calls
deviceID()
System.deviceID()
provides an easy way to extract the device ID of your device. It returns a String object of the device ID, which is used to identify your device.
// EXAMPLE USAGE
void setup()
{
// Make sure your Serial Terminal app is closed before powering your device
Serial.begin(9600);
// Wait for a USB serial connection for up to 30 seconds
waitFor(Serial.isConnected, 30000);
String myID = System.deviceID();
// Prints out the device ID over Serial
Log.info("deviceID=%s", myID.c_str());
}
void loop() {}