I am measuring some sensors using the Arduino RP2040 connect and when I try to print these variables to a string using dtostrf() I receive a compilation error saying that dtostrf() is not declared within the scope.
For example:
although this code compiles fine for any other Arduino board. Is there a specific reason dtostrf() was not included in the Arduino Nano RP2040 connect background header files?
I think the reason is that the limited resources of the AVR chips make the additional overhead you would get from using the standard C++ sprintf too onerous.
Since this function is very common in Arduino code, the non-AVR boards platforms often provide such functions for portability, but declared in header files in a dedicated subfolder of the core library. So to use them, you must add an #include directive to your sketch for that header file: