Error with dtostrf

Hi,

I want to convert float to string/char array. I am using the function dtostrf (http://www.atmel.com/webdoc/avrlibcreferencemanual/group__avr__stdlib_1ga060c998e77fb5fc0d3168b3ce8771d42.html).

I have attached my testing program below.
The problem is, that it is always changing the 6th digit after the decimal point. Is this function not meant for float numbers with this large amount of numbers after the decimal point or am I doing something wrong? :confused:

I appreciate every answer :slight_smile:

dtostrf_Test.ino (174 Bytes)

Function is meant for it. Float is not. 6 digits is about the max accuracy of a float. If you want accuracy, use a integer type. And remember, float != decimal point :wink: