Hello I work with a "STRING" problem.
I need to send some data to my server which will be packaged together in a string with ID data and link file name.
I've simplified the code to the problem.
If I use "int testc = 25" so it works although without decimals.
I must, however, use decimals to a calculation.
but if I use "float testc = 25.65".
Become the result nonsense.
I think that my problem has something to do with %c to do.
but I'm not sure.
Except that there isn't support for %f in the arduino. The easiest way is to convert the float to a string first with dtostrf and then use sprintf with that string already as a string.
Delta_G:
Except that there isn't support for %f in the arduino. The easiest way is to convert the float to a string first with dtostrf and then use sprintf with that string already as a string.
Didn't know that - never used Arduino printf/sprintf. Yet another way to do it is: