From 671c1b3726859c0b941b4d5dfc81cafc7eb564fb Mon Sep 17 00:00:00 2001 From: fabik111 Date: Wed, 30 Jul 2025 10:44:24 +0200 Subject: [PATCH] change reconfigure pin for nicla vision --- .../NetworkConfiguratorDemo/NetworkConfiguratorDemo.ino | 1 + src/ANetworkConfigurator_Config.h | 2 +- src/Arduino_NetworkConfigurator.cpp | 1 + src/Arduino_NetworkConfigurator.h | 1 + src/utility/ResetInput.cpp | 9 +++++++++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/NetworkConfiguratorDemo/NetworkConfiguratorDemo.ino b/examples/NetworkConfiguratorDemo/NetworkConfiguratorDemo.ino index bc03b42..8909ad2 100644 --- a/examples/NetworkConfiguratorDemo/NetworkConfiguratorDemo.ino +++ b/examples/NetworkConfiguratorDemo/NetworkConfiguratorDemo.ino @@ -21,6 +21,7 @@ * - Arduino MKR WiFi 1010: short the pin 7 to GND until the led turns off * - Arduino GIGA R1 WiFi: short the pin 7 to GND until the led turns off * - Arduino Nano RP2040 Connect: short the pin 2 to 3.3V until the led turns off + * - Nicla Vision: short the pin PA_13 to GND until the led turns off * - Portenta H7: short the pin 0 to GND until the led turns off * - Portenta C33: short the pin 0 to GND until the led turns off * - Portenta Machine Control: the reset is not available diff --git a/src/ANetworkConfigurator_Config.h b/src/ANetworkConfigurator_Config.h index db539f2..1db3365 100644 --- a/src/ANetworkConfigurator_Config.h +++ b/src/ANetworkConfigurator_Config.h @@ -97,7 +97,7 @@ #if defined(ARDUINO_NICLA_VISION) #define NETWORK_CONFIGURATOR_COMPATIBLE 1 - #define PIN_RECONFIGURE 2 + #define PIN_RECONFIGURE PA_13 #define LED_RECONFIGURE LED_BUILTIN #define BOARD_HAS_RGB #define GREEN_LED LEDG diff --git a/src/Arduino_NetworkConfigurator.cpp b/src/Arduino_NetworkConfigurator.cpp index e4e2bfd..548add5 100644 --- a/src/Arduino_NetworkConfigurator.cpp +++ b/src/Arduino_NetworkConfigurator.cpp @@ -111,6 +111,7 @@ NetworkConfiguratorStates NetworkConfiguratorClass::update() { * - Arduino MKR WiFi 1010: short the pin 7 to GND until the led turns off * - Arduino GIGA R1 WiFi: short the pin 7 to GND until the led turns off * - Arduino Nano RP2040 Connect: short the pin 2 to 3.3V until the led turns off + * - Nicla Vision: short the pin PA_13 to GND until the led turns off * - Portenta H7: short the pin 0 to GND until the led turns off * - Portenta C33: short the pin 0 to GND until the led turns off * - Portenta Machine Control: the reset is not available diff --git a/src/Arduino_NetworkConfigurator.h b/src/Arduino_NetworkConfigurator.h index 207e5ea..0b5c929 100644 --- a/src/Arduino_NetworkConfigurator.h +++ b/src/Arduino_NetworkConfigurator.h @@ -58,6 +58,7 @@ enum class NetworkConfiguratorStates { ZERO_TOUCH_CONFIG, * - Arduino MKR WiFi 1010: short the pin 7 to GND until the led turns off * - Arduino GIGA R1 WiFi: short the pin 7 to GND until the led turns off * - Arduino Nano RP2040 Connect: short the pin 2 to 3.3V until the led turns off + * - Nicla Vision: short the pin PA_13 to GND until the led turns off * - Portenta H7: short the pin 0 to GND until the led turns off * - Portenta C33: short the pin 0 to GND until the led turns off * - Portenta Machine Control: the reset is not available diff --git a/src/utility/ResetInput.cpp b/src/utility/ResetInput.cpp index 70d322e..1e02645 100644 --- a/src/utility/ResetInput.cpp +++ b/src/utility/ResetInput.cpp @@ -11,6 +11,10 @@ #include "ResetInput.h" #include "utility/LEDFeedback.h" +#if defined(ARDUINO_NICLA_VISION) +#include +#endif + #if defined(ARDUINO_PORTENTA_H7_M7) #include @@ -39,7 +43,12 @@ ResetInput &ResetInput::getInstance() { } ResetInput::ResetInput() { + #if defined(ARDUINO_NICLA_VISION) + _pin = PinNameToIndex(PIN_RECONFIGURE); + #else _pin = PIN_RECONFIGURE; + #endif + _expired = false; _startPressed = 0; _fireEvent = false;