Can't sprinf double value for photon

I use spintf to construct a text with int and double value and then publish it to the dashboard.

int a = 23; double b = 24.4; double c = 25.5; int d = 26;

sprintf( 
    publishString, 
    "{\"a\":\"%d\",\"b\":\"%.2f\",\"c\":\"%.2f\",\"d\":\"%d\"}", 
    a,b,c,d
);

it works well for core, however when it comes to photon, the dashboard doesn’t print any double value only the int value

there is lots on the forum on this. try searching “sprintf float photon” you will see there is a solution in the works, and a workaround.

Looks like it should be fixed in the next firmware release:

1 Like

deja vu!

:slight_smile: