MKR-NB-1500 Using dtostrf.h suddenly broken?

I have a few floats I am trying to convert to strings. I discovered that Sprintf doesn't do this properly and found a thread telling me to add

#include <avr/dtostrf.h>

to my code and all would be well. I did and It was working great all week until today.

Now, when I try to compile, I get this compiler error

  -> candidates: [Adafruit BNO055@1.6.1]
"C:\\Users\\dnear\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\dnear\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\dnear\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\mega" "-IC:\\Users\\dnear\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\Wire\\src" "-IC:\\Users\\dnear\\Dropbox (FTE)\\My PC (FT-PC36)\\Documents\\Arduino\\libraries\\SparkFun_u-blox_GNSS_Arduino_Library\\src" "-IC:\\Users\\dnear\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\SPI\\src" "-IC:\\Users\\dnear\\Dropbox (FTE)\\My PC (FT-PC36)\\Documents\\Arduino\\libraries\\SparkFun_I2C_Mux_Arduino_Library\\src" "-IC:\\Users\\dnear\\Dropbox (FTE)\\My PC (FT-PC36)\\Documents\\Arduino\\libraries\\Adafruit_ADS1X15" "-IC:\\Users\\dnear\\Dropbox (FTE)\\My PC (FT-PC36)\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "-IC:\\Users\\dnear\\AppData\\Local\\Arduino15\\libraries\\SD\\src" "-IC:\\Users\\dnear\\Dropbox (FTE)\\My PC (FT-PC36)\\Documents\\Arduino\\libraries\\Adafruit_Sensor" "-IC:\\Users\\dnear\\Dropbox (FTE)\\My PC (FT-PC36)\\Documents\\Arduino\\libraries\\Adafruit_BNO055" "C:\\Users\\dnear\\AppData\\Local\\Temp\\arduino-sketch-4F29443D5920B3E839D0094A737F27C5\\sketch\\data-logger.ino.cpp" -o nul
Alternatives for avr/dtostrf.h: []
ResolveLibrary(avr/dtostrf.h)
  -> candidates: []
In file included from C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\data-logger\init.h:9:0,
                 from C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\data-logger\data-logger.ino:3:
C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\data-logger\BNO055.h:5:10: fatal error: avr/dtostrf.h: No such file or directory
 #include "avr/dtostrf.h"
          ^~~~~~~~~~~~~~~
compilation terminated.

Using library Wire at version 1.0 in folder: C:\Users\dnear\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire 
Using library SparkFun u-blox GNSS Arduino Library at version 2.2.19 in folder: C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_Arduino_Library 
Using library SPI at version 1.0 in folder: C:\Users\dnear\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI 
Using library SparkFun I2C Mux Arduino Library at version 1.0.3 in folder: C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\libraries\SparkFun_I2C_Mux_Arduino_Library 
Using library Adafruit ADS1X15 at version 2.4.0 in folder: C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\libraries\Adafruit_ADS1X15 
Using library Adafruit BusIO at version 1.14.1 in folder: C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\libraries\Adafruit_BusIO 
Using library SD at version 1.2.4 in folder: C:\Users\dnear\AppData\Local\Arduino15\libraries\SD 
Using library Adafruit Unified Sensor at version 1.1.6 in folder: C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\libraries\Adafruit_Sensor 
Using library Adafruit BNO055 at version 1.6.1 in folder: C:\Users\dnear\Dropbox (FTE)\My PC (FT-PC36)\Documents\Arduino\libraries\Adafruit_BNO055 
exit status 1

Compilation error: avr/dtostrf.h: No such file or directory

Arduino IDE did update earlier today, but I was compiling and uploading code all morning after that without issue. It's currently at Version 2.0.2 Date 2022-11-17T11:54:56.612Z CLI version 0.29.0 [76251df9]

Digging into my AppData folder, I found it's located in C:\Users\dnear\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino\api\deprecated-avr-comp\avr

So I'm guessing I shouldn't be using it any more?

What should I be using instead of dtostrf.h to format a float into a string?

I use #include <avr/dtostrf.h>, but I haven't recompiled in a while. I will let you know if it works for me.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.