arduino-sps icon indicating copy to clipboard operation
arduino-sps copied to clipboard

Implement Integer readout on newer SPS firmware to avoid I2C buffer issues

Open winkj opened this issue 5 years ago • 1 comments

winkj avatar Oct 31 '20 15:10 winkj

On additional problem is the serial number, which can be up to 32 bytes (so 48 bytes including checksums) long (though I think it is shorter in practice, so with some smartness in the code, even a short read can probably still return success if it reads at least one NUL byte and then assume all missed bytes would also have been NUL).

As for reading integers instead of floats, IIUC, this just rounds the values to integers, right? Would have been nice if a fixed-point format was used, since only 12 bits are needed for the supported 0-3000 #/cm³, so that could have left 4 bits for a fixed point part. OTOH, the actual precision is ±10 at best, so rounding to integers probably won't lose any really meaningful info anyway.

matthijskooijman avatar Oct 31 '20 17:10 matthijskooijman