🛠 Faire clignoter la LED embarquée

Arduino MKR NB 1500 · debutant · Schéma : IMG-mkr-nb-1500-debutant-1-mkrnb-blink-led.svg — Carte MKR NB 1500 vue de dessus avec la LED utilisateur D6 mise en évidence et le câble micro-USB branché

Objectives

Discover the Arduino MKR NB 1500 board (Microchip ATSAMD21G18A, Arm Cortex-M0+ 48 MHz, 256 KB flash / 32 KB RAM), install the SAMD core, and blink the onboard LED, wired to pin D6 (LED_BUILTIN, physical pin PA20).

Hardware

Complete code

// Clignotement LED embarquee — MKR NB 1500
const uint8_t LED = LED_BUILTIN; // D6 (PA20)

void setup {
  pinMode(LED, OUTPUT);
}

void loop {
  digitalWrite(LED, HIGH);
  delay(200);                    // 0,2 s allumee
  digitalWrite(LED, LOW);
  delay(1800);                   // 1,8 s eteinte
}

Expected verification

Select “Arduino MKR NB 1500” in Board Types, then upload: the LED on D6 blinks 0.2 s on / 1.8 s off. The upload uses the SAM-BA bootloader (bossac tool); the COM port may disappear and then reappear during the operation, which is normal.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials