No dtostrf for Giga?

trying to use a sketch with the use of "dtostrf" but i get the error:
Compilation error: 'dtostrf' was not declared in this scope

am i missing something? do i need to include something in now?

Thanks in advance for any help. :slight_smile:

How are you using it?
dtostrf = 5; ??
That error could maybe result from several things?

dtostrf(tempF, 4, 2, sz);

tempF is a float variable, and sz is a char array.

it seems that Arduino depreciated it for the giga... found it in "C:\Users\travi\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.0.8\cores\arduino\api\deprecated-avr-comp\avr"

in folder : "C:\Users\travi\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.0.8\cores\arduino"
i created dtostrf.h with the contents of:

#include "api/deprecated-avr-comp/avr/dtostrf.c.impl"

and saved it. then, in my sketch, i added:

#include <dtostrf.h>

and it now works :slight_smile:

3 Likes

wanted to point out, as a side note, that sprintf() works with floating point numbers now. could be why it was depreciated.