[SOLVED] Sensor Data Problem


#1

I need help Im new to Ubidots. My sensor data changes prior to posting.


#2

Greetings, your value must be float type, not char. Please refer to the official example for sending a single dot and adapt it to your needs.

All the best


#3

Thank you very much for the reply. Yes I tried it earlier but still the same result.


#4

Greetings, thanks for contacting us again.

You are reading your values as bytes from your serial port, and then casting them to float, because of that you just see a ‘1’, because the read() method just returns the last read byte. If you do not know the basics about C data types, I strongly advise you to reference them here as our support bandwidth is not enough to solve these kinds of doubts.

I also advise you to use the basic example that I have just shared with you, understand it, and then just try to create your own custom routine.

All the best.


#5

Thank you very much l will into your advice.


#6

It’s now working perfectly.


#7

Nice! I am glad to know that you found a way to solve your issue.

All the best