🛠 Clignoter la LED embarquée D6

Arduino MKR WAN 1310 · debutant · Schéma : IMG-mkr-wan-1310-debutant-1-mkrwan1310-clignotement-led.svg — La carte MKR WAN 1310 vue de dessus, câble micro-USB branché, LED D6 (broche 6) entourée d'un halo.

Objectives

Discover the Arduino MKR WAN 1310 board (Microchip SAMD21G18A, Arm Cortex-M0+ 48 MHz, 256 KB flash) by blinking the onboard LED D6, wired to pin 6 (LED_BUILTIN), and understand the difference with the ON LED.

Hardware

Complete code

// Clignotement LED D6 (LED_BUILTIN = 6) — MKR WAN 1310
const int LED = LED_BUILTIN; // broche 6 selon la fiche technique

void setup {
  pinMode(LED, OUTPUT);
  Serial.begin(115200);      // USB natif du SAMD21
  while (!Serial);           // attend l'ouverture du moniteur série
  Serial.println("MKR WAN 1310 - blink D6");
}

void loop {
  digitalWrite(LED, HIGH);
  Serial.println("LED ON");
  delay(200);
  digitalWrite(LED, LOW);
  delay(800);
}

Expected verification

The D6 LED blinks in short pulses (200 ms on, 800 ms off) and the serial monitor displays a message per cycle. Uploading uses bossac against the SAM-BA bootloader (reset by touching 1200 bauds).

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials