esp32-p4-hydra-gpio-blink.ino

Adafruit Metro ESP32-P4 Hydra · File : esp32-p4-hydra-gpio-blink.ino · Language : C++ (Arduino) · Use case : Faire clignoter la LED intégrée pour valider le fonctionnement de base des GPIO.

Minimalist example to test digital output and basic timing on the board.

Use the Arduino IDE with ESP32-P4 support installed. Select 'Adafruit Metro ESP32-P4 Hydra' in the Board Manager. Compile and upload via the USB-C port. Open the Serial Monitor at 115200 bauds to see startup messages.

esp32-p4-hydra-gpio-blink.ino

#include <Arduino.h>

// La LED intégrée sur la Metro ESP32-P4 Hydra est généralement sur GPIO 2 ou 3.
// Vérifier le schéma exact, mais GPIO 2 est un standard courant sur les ESP32.
#define LED_PIN 2

void setup() {
  Serial.begin(115200);
  pinMode(LED_PIN, OUTPUT);
  Serial.println("Metro ESP32-P4 Hydra - Blink Test");
}

void loop() {
  digitalWrite(LED_PIN, HIGH);
  delay(1000);
  digitalWrite(LED_PIN, LOW);
  delay(1000);
}

← Back to the board