I get errors after installing MegunoLink library


I’m trying to use MegunoLink with my Arduino Nano IoT. After I installed the library and just compile my code I get a arror as such:

I do not understand this I have used MegunoLink before with an ESP32 and Mega2560 without any issue. This library should work with the Nano, but maybe I need to take an extra step with Platform IO.

Note that even when I do not include the lib in my code and do not call methinds from the lib I still get this message. I wonder why, is there anybody who can help me with this?

Thanks in advance

Well some errors are understandable.

For example, I get

.pio\libdeps\nano33ble\MegunoLink\src\ArduinoTimer.cpp:3:1: error: reference to ‘ArduinoTimer’ is

which is since the library

directly conflicts with a class created in the core

So that’s a kaboom and they’d need to use different names.

The first kaboom in the Formatting.h class is due to the class doing

it attempts to be minimal by only including Print.h to get the Print and Printable classes, however, in the Arduino core used for the Nano 33 BLE, this is wrong because including only that header declares those classes in the arduino namespace, which means the referenced class would have to be written as arduino::Printable. The easiest way to solve this is to just #include <Arduino.h> instead, because this activates a using namespace arduino; in the header and so the referencable name is again Printable.

I’ve correct all these compile errors through this.

In your platformio.ini, replace your previous

lib_deps =


lib_deps =

Tracked in

and fixed

if they chose to accept it.

Thanks for this clear information I’ll have a look into it, much appreciated