🛠 Premier sketch : faire clignoter une LED sur Arduino Opta

Arduino Opta (micro PLC, STM32H747) · debutant · Schéma : IMG-opta-plc-debutant-1-opta-clignotement-led.svg — Arduino Opta vue de face avec les 4 LED utilisateur surlignées et le câble USB-C de programmation branché

Objectives

Discover the Arduino Opta, Arduino's certified micro-PLC (STM32H747XI dual-core Cortex-M7 480 MHz + Cortex-M4 240 MHz), by programming your first sketch: making a user LED blink. By the end of this tutorial, you will know how to install the core, upload a sketch, and understand the basic pinout.

Hardware

Complete code

// opta_clignotement_led.ino — core « Arduino Mbed OS Opta Boards »
// Les 4 LED utilisateur sont pilotables via les broches LED1..LED4.

const int LEDS[] = {LED1, LED2, LED3, LED4};

void setup {
  Serial.begin(9600);
  for (int i = 0; i < 4; i++) {
    pinMode(LEDS[i], OUTPUT);
    digitalWrite(LEDS[i], LOW);
  }
  Serial.println("Opta : demo LED prete");
}

void loop {
  for (int i = 0; i < 4; i++) {
    digitalWrite(LEDS[i], HIGH);
    delay(200);
    digitalWrite(LEDS[i], LOW);
  }
}

Expected verification

The 4 user LEDs blink in sequence (a "chaser" effect) every 200 ms. The serial monitor displays the startup message. On the WiFi variant, a fifth network status LED remains managed by the firmware.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials