How can i get a core's name or ID?


I have two Spark Cores, Jake and Elwood, that run the same code, reporting thermometer values over MQTT. I need each core to report their name (or any unique identifier) to the MQTT broker on my LAN.

Is there a function that pulls any ID from a Core which i could use, something like the Electric Imp’s hardware.getdeviceid()? Will i find help in the topic , which honestly speaking, it a bit over my head? Or is this a job for Spark Variables, so that the ID is stored in the cloud for each Core?


Try this for the core’s device id as an Arduino String class object:

String myIDStr = Spark.deviceID();

Thank you! I must not have read the API docs very well because i didn’t see that one before.