Skip to content
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

Nano pin define fixes #2

Closed

Conversation

KurtE
Copy link

@KurtE KurtE commented Jan 27, 2025

Fix the connector pin list for pins 7, 8, 18, 19 and 21

Also second change was to change the PWR led to on at startup to match the behavior of the MBED builds.

KurtE added 2 commits January 27, 2025 10:27
To match the pins as shown on the pinout page for the NANO 33 BLE SENSE

Tested with simple Arduino sketch:
```
int blink_pin = 2;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  for (uint8_t i=0; i < 4; i++) {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(100);
    digitalWrite(LED_BUILTIN, LOW);
    delay(100);
  }
  pinMode(LED_BUILTIN, INPUT);
  Serial.begin(115200);
  while (!Serial) {}
  Serial.println("Quick blink pin test");
  Serial.println (blink_pin);
  pinMode(blink_pin, OUTPUT);
  Serial.print("LED_BUILTIN: ");
  Serial.println(LED_BUILTIN);
}

void loop() {
  digitalWrite(blink_pin, HIGH);
  delay(250);
  digitalWrite(blink_pin, LOW);
  delay(250);
  if (Serial.available()) {
    int new_pin = Serial.parseInt();
    while (Serial.read() != -1) {
      pinMode(blink_pin, INPUT);
      blink_pin = new_pin;
      pinMode(blink_pin, OUTPUT);
      Serial.print("New pin: ");
      Serial.println(blink_pin);
    }
  }
}
```
Where you can type in a pin number and then jumper that pin to D13 and it should blink the LED.
Fixed it for most of these pins, although 18 and 19 have issue with not blinking as zephyr has those
pins in use.
This matches the sate of the LED if you run it on MBED.

Note: wondering if the led defines in some of the dtsi files should be renamed from user to PWR to match
what is shown in the pinout for these boards.  But maybe used elsewhere for USER, like maybe maybe python?
@KurtE KurtE closed this by deleting the head repository Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant