On arduino work great. On esp32 I get only first number. When I try something like commented line (with "TEST") display work like it shold do.
I even tried: char result[5]="TEST"; only got T on display.
Is it problem with md_parola library or the problem is in me? Thank you in advance.
Unless you are dealing with single digit temperatures, your array is too small. 17.4 is 4 characters, plus a terminating NULL means a 5 element array minimum.
If the temperature is greater than 10, you are writing beyond the end of the array, and stomping on memory you don't own. You have no control over what happens when you do that. So, don't do that.
Not worse, the same. Nothing new happend. I got number 2, and when temperature changed I got another 2, so on display was 22, and after that 222... When I switch back to Arduino Uno, everything works like it should do.
You are calling dtostrf() already, which does that. Have you printed the array that dtostrf() writes to, to be sure that it contains what you think it should?
As explained in the library documentation, the text buffer should be global, or at least static, and persist during the time it takes for animation to complete. Parola does not copy the data to an internal buffer in order to reduce memory requirements.
P.displayText() and the later P.animate() expects the data will be available between the calls. Your result array is local scope and will not be around any more once the animate() method is called, so the results will vary between compiles and architectures, as you have found out. Declaring it as a pointer to a constant means that data is not overriden and retained during the animation.
Your code will work if you use P.print() as the animate() is built into the print() method, or if you use animate() straight after the call to displayText().
Sorry for opening up an old thread. I am curious what kind of display did you use? Is it LED array? How big panel? I am thinking about driving a 3 panel display each with 4x max7219. Not sure if I will be able to power it with ESP32.