CubeCell, send float values to TTN

Hi !

I am a beginner with microcontrollers, and wish to make a remote sensor using CubeCell. Collecting and sending temperature (DS, DHT22 sensor), humidity, water level values, that are mostly floating numbers.

I started with the arduino “LoraWanMinimal” example sketch, to understand the work principle.
Joining TTN was OK, example sketch is working sending integer values counting upwards.

I understand this is the send command line, counter is the variable integer value:

LoRaWAN.send(1, &counter, 1, requestack)

How to use this line if I would want to send another variable (f.eg. temperature), that happens to be a float value, like 22,55 ?

Thank you for helping !

I just multiply by 100 on the sending side so the 22,55 becomes integer 2255. Then on the receiving side, divide by 100 to get back to float.

:man_facepalming: Indeed !!!

I am ashamed, not to have come to this conclusion by myself. So easy, so clear. Sometimes solutions are much simpler as one may think…

Thanks you !