Skip to content

Change reconfigure pin for nicla vision #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ANetworkConfigurator_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

#if defined(ARDUINO_NICLA_VISION)
#define NETWORK_CONFIGURATOR_COMPATIBLE 1
#define PIN_RECONFIGURE 2
#define PIN_RECONFIGURE 39 // PA_13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to call it A1 as in the documentation (pin numbers are unstable)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The analog pins are not working, we found the pin PA_13 that works. For using a label we should have used a translation function that usually we don't have, so we have prefered put the pin number with the label in the comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested A0 yesterday and it was working on a basic sketch, let me check with the full thing. Moreover, PA13=SWD is not a real pin but a "fin" between pins, so I strongly recommend NOT to use it for any reason except during manufacturing

Copy link

@facchinm facchinm Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sketch works as intended, with a button connected to A0 (the uppermost pin, close to the reset button and the LED)

int i = 0;
void _pressedCallback() {
  digitalWrite(LED_BUILTIN, i % 2 == 0 ? LOW : HIGH);
  i++;
}

// the setup function runs once when you press reset or power the board
void setup() {
  pinMode(A0, INPUT_PULLUP);
  pinMode(LED_BUILTIN, OUTPUT);
  attachInterrupt(A0, _pressedCallback, CHANGE);
  digitalWrite(LED_BUILTIN, HIGH);
  Serial.begin(115200);
}

// the loop function runs over and over again forever
void loop() {
  delay(1000);
  Serial.println(i);
}

#define LED_RECONFIGURE LED_BUILTIN
#define BOARD_HAS_RGB
#define GREEN_LED LEDG
Expand Down
1 change: 1 addition & 0 deletions src/Arduino_NetworkConfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Arduino_NetworkConfigurator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading