From 71ca9fb84b097af1fa82f3058dcae7b21c6fc56d Mon Sep 17 00:00:00 2001 From: Giovanni Bruno Date: Tue, 1 Jul 2025 15:42:22 +0200 Subject: [PATCH] fix: error if nano esp32 and selected Arduino pin number --- src/Modulino.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Modulino.h b/src/Modulino.h index f723e24..a79d4b5 100644 --- a/src/Modulino.h +++ b/src/Modulino.h @@ -4,6 +4,11 @@ #ifndef ARDUINO_LIBRARIES_MODULINO_H #define ARDUINO_LIBRARIES_MODULINO_H +#if defined(ESP32) && defined(BOARD_HAS_PIN_REMAP) && defined(tone) + #error "The current configuration is unsupported, switch Pin Numbering to "By GPIO number" or #undef tone and #undef noTone in the beginning of your sketch." + #error "Learn more at: https://support.arduino.cc/hc/en-us/articles/10483225565980-Select-pin-numbering-for-Nano-ESP32-in-Arduino-IDE" +#endif + #include "Wire.h" #include // from stm32duino #include // from stm32duino