IDE Bug - dtostrf not supported Adafruit Feather M0

The function dtostrf is not supported in the new IDE for Adafruit Feather M0. This code gives a compilation error:

static float f_val = 123.6794;
static char outstr[15];

void setup() {
dtostrf(f_val,7, 3, outstr);


void loop(){

error is:

'dtostrf' was not declared in this scope


Add this line to the top of your sketch:

#include <avr/dtostrf.h>

I have the same problem with a NANO 33 BLT type. Is there such a simple solution to it?


The answer is actually different for Nano 33 BLE than for the Feather M0. Since it’s not really relevant to this thread, I’ll answer in the dedicated thread RudolfAtRTC created about this:

I’m just trying to figure out the ltoa part of the question right now.