Sensor data in file upto 4 digits

Hello,
I am using a ntc sensor and reading its resistance and then i am converting that resistance to temperature. Now, I want to write the temperature value to a txt file in sd card. The temperature value should be written upto 4 significant decimal digits but it is writing upto only 2 decimal digits even after using serial.print (T,4). How can i solve this problem.

Your topic was MOVED to its current forum category as it is more suitable than the original as it is not an Introductory Tutorial

Please post your full sketch, using code tags when you do, so that we can see how you write the values to the SD rather than how you print them

By changing the code that you haven't shared with us.

The accuracy of a common used conversion is +-3 degrees. Decimals have no point.

What happens when you write the same way to the serial monitor instead?

Thanks, i have solved the issue. Command Datafile.print(T,4) is working for me.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.