I use the distance measurement library NewPing and for the more accurate values I put the current temperature and humidity into the equation. However, I get millimeters, which is quite a fluctuating value. Can the NewPing library convert my measured parameters to centimeters, how?

I get millimeters, which is quite a fluctuating value. Can the NewPing library convert my measured parameters to centimeters, how?

Have you tried the ping_cm() function of the library ?

Or, here is a radical solution, do the conversion yourself

ping_cm () does not allow you to use temperature or humidity to refine measurements.

cevepe: ping_cm () does not allow you to use temperature or humidity to refine measurements.

OK. If you currently get a distance in millimetres then it is, of course, trivial convert it to centimetres

How much variation in temperature and humidity do you see?

If you put your code in the rubbish bin, you should have put your question there, too.

If you put your question here, you should put your code here, too.