Go Down

Topic: I can't parse this data into float (Read 632 times) previous topic - next topic

RTAF

I have a char data from serial of arduino. each data seperated by comma. the sample shown below.

12.02020,210.125454,10.12,1

I use parseFloat() to seperate each to array but the seperated data in array is only 2 digit decimal.

How to solve this problem? I tried for 5 days but I can't fond the solution.

majenko

How do you know the data in the array is only 2 decimal places?


majenko

And do you tell the Serial.print command to print more than 2 decimal places?

RTAF

I got it. Thank you for your help

Serial.println(values);

it works!


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy