arduino-sps
arduino-sps copied to clipboard
Implement Integer readout on newer SPS firmware to avoid I2C buffer issues
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.