Remember that Messages are super tiny ... We shall encode Sensor Data in CBOR ... And our Data Source needs to decode the CBOR Payload

lupyuen.github.io/articles/ttn

@lupyuen Floating point numbers compress great with CBOR, you just gotta know the precision you want. (Mostly into 16bit halfs: 12.34 has as much precision there as in decimal, and takes exactly as many bytes as 1234).

Then again, floats on embedded are annoying. (But if it was just that, 1234x10**-2 is just 6 bytes of CBOR and usable w/o needing to know your sensor's scaling factor).

Follow

@chrysn Cool I'll add that to the article thanks!

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.