Go Down

Topic: I can't parse this data into float (Read 605 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?

RTAF


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