How can I get all the variables that I send by com from a pic

from my pic i send to node red four data to node red, but I don't know how to separate each one to visualize it in the dashboard

I send this data just to test
My Code in the pic is :
printf("%i", A) ;
printf("%i", H) ;
printf("%i", T) ;
printf("%i", N) ;

Help please i need to visualize them in the dashboard each one separately

If you send them as a json string then it wll make it easy. Change the code so that it sends something like this text
{"a": 1, "h": 2, "t": 3, "n": 4}

Then in node red send it through a JSON node and it will convert it to a javascript object. Something like this might do it, but it is a long time since I used C(?)
printf('{"a": %i, "h": %i, "t": %i, "n": %i}', A, H, T, N);

[Edit] That might need to be
printf("{\"a\": %i, \"h\": %i, \"t\": %i, \"n\": %i}", A, H, T, N);

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.