Can't display System.version as a Cloud variable

I have used cloud variables quite frequently but this one has me stuck (and a bit crazy). Should be simple and I’m sure it will be to someone who’s seen this before. I just want to display the current system firmware of my Photon. If I use the following code, I have no problem displaying it to the Serial Monitor window in Particle Dev. The problem is when I want to make it visible to the cloud it displays � or � � which is the symbol for a non-printable Unicode character. This should be a String as I am using the specified method in the Particle documentation System.version( ) as shown.

My code is:

The cloud display of sysFWVersion is shown using the Particle Web Interface.

This prints to the serial monitor just fine. Not clear what the limitations of the cloud display variables are but a string like this should be simple enough. Any ideas?

I’ll take a stab at this one. The variable sysFWVersion goes out of scope when setup() finishes. Move it up and outside the loop.

String sysFWVersion = System.verison().c_str();

void setup() {
  Particle.variable("SysFirmware", sysFWVersion);

Thanks for the response. Doh! Should have seen that.