Compilation of demo MPU6050_DM6 for Arduino Nano 33 BLE fails [workaround included]
Closed this issue · 2 comments
robtasm commented
Compilation of the example script MPU6050_DM6, freshly installed version 0.2.1, targeting the Nano 33 BLE, fails with the error:
/Users/rob/Documents/Arduino/libraries/MPU6050/src/MPU6050.cpp: In member function 'void MPU6050::PrintActiveOffsets()':
/Users/rob/Documents/Arduino/libraries/MPU6050/src/MPU6050.cpp:3309:154: error: 'dtostrf' was not declared in this scope
In packages/arduino/hardware/mbed_nano/2.0.0/cores/arduino
there is api/deprecated-avr-comp/avr/dtostrf.c.impl
which suggests adding the line
#include "api/deprecated-avr-comp/avr/dtostrf.c.impl"
to the top of MPU6050.cpp would provide this definition. That makes compilation work for me; for a release you might have to wrap that #include
in some #ifdef
protection.