Ubidots Community

Use INT instead of float with NANO 33 IOT over HTTP

Hi everyone, I’m newbie here. I connected my NANO 33 IOT to the Ubidots according to the following article.

Connect the Arduino Nano 33 IoT with Ubidots over HTTP

I actually want to switch the variable data types from Float to INT. Now the question is whether that is possible.
As far as I’ve tried it doesn’t work. If anyone knows that, help me for it. thanks

Hi @BHS_Milad

I’m glad to see you around the community!

What you need is actually possible and it shouldn’t display an error, the Ubidots.add method will receive an integer value, but it will always be casted to a float value, internally.

It’s worth mentioning that any value sent to Ubidots will be converted to float , so even if you send a 10, it will be displayed as a 10.0.In order to help you further, can you share either your code, or screenshots of the error? This would help troubleshooting.

All the best,