Device ID over serial line

photon
Tags: #<Tag:0x00007fe220cc4660>

#1

I am setting up sensors with the Particle Photon. I would like to identify them uniquely from the serial connection. At the moment, my code on the Particle Photon outputs:

timestamp,temperature,acceleration

I want to include the device ID as a filed. Particle published a way to query the device ID and I would like to print it from within the firmware code to the serial line.

Is it possible to print a device ID on the serial line?


#2

It’s accessible from the device itself as well, and returns a String object: https://docs.particle.io/reference/device-os/firmware/argon/#deviceid-

You’re then free to do with that as you please.


#3

Thanks! That solved my problem and I added an answer to the original question on StackOverflow, which also asked about the SparkFun OpenScale.