FX30S USP data in ASCII

Hello,

I got the FX30S to send the serial stream from the Atlas Scientific pH sensor to the Octave portal using the delimiter method to look for the carriage return (0x0D).

It looks like the data is being presented in decimal format, see below -

“data”: [
99,
104,
101,
99,
107,
32,
112,
114,
111,
98,
101,
141
]
99, 104, 101, 99, 107, 32, 112, 114, 111,98,101,141 translates to “check probe” in ASCII, which is expected since I didn’t have the probe attached for this test. When the probe is attached it would provide something like (55, 46, 48) which translate to “7.0” in ASCII. Is there an easy way to configure the output for ASCII or would this require some additional JavaScript?

Please let me know.

Thanks,

Max

Hello Max,
Thank you for using USP.
For now there is no way to indicate to USP to produce data in another format.
I suggest you add an Observation of kind Edge Action on usp/value, and then manipulate the data in JavaScript.
I think you should be able to make some progress with String.fromCharCode
Example:
var res = String.fromCharCode(72, 69, 76, 76, 79);
Regards,
Nicolas

1 Like