clignotante.ino

Arduino GIGA R1 WiFi · File : clignotante.ino · Language : Arduino · Use case : Vérifier la carte avec la LED intégrée

The GIGA's power-on test: the user LED (Mbed pin 132) blinks and the serial port confirms the Arduino-Zephyr core is alive. Nothing to solder.

Hardware required

An Arduino GIGA R1 WiFi (STM32H747, 1DX radio module: Wi-Fi b/g/n + BLE, u.FL antenna included), powered over USB-C. None.

Wiring

No wiring; power via USB-C (or 5-24 V on VIN). Pin logic is 3.3 V.

How it works

millis() drives the cadence without blocking; on the 480 MHz M7 the loop cost is measurable with micros(). The Arduino Zephyr/Mbed platform accepts classic AVR-style code. In the Arduino IDE, « Arduino Zephyr-based Boards » platform, « Arduino Giga R1 » board; fit the u.FL antenna before using the radio, then Upload.

Going further

Vary the period with a button on D2, or print the real loop rate (the core is fast).

clignotante.ino

// Clignotement non bloquant sur la GIGA R1 (LED_BUILTIN = broche 132).
const unsigned long PERIODE = 500;

bool etat = false;
unsigned long precedent = 0;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(115200);
  Serial.println("GIGA R1 : clignotement a 1 Hz");
}

void loop() {
  unsigned long t = millis();
  if (t - precedent >= PERIODE) {
    precedent = t;
    etat = !etat;
    digitalWrite(LED_BUILTIN, etat ? HIGH : LOW);
    Serial.printf("etat %d — cycle count %lu\n", etat, micros());
  }
}

← Back to the board