m5paper_gpio_led_blink.ino
Minimalist example to verify GPIO functionality via the integrated red LED.
Uses the M5EPD library. The red LED is connected to GPIO 40. Compile with the 'M5Paper' board selected in the Arduino IDE. Ensure the USB cable is connected for power.
m5paper_gpio_led_blink.ino
#include <M5EPD.h>
M5EPD m5epd;
void setup() {
// Initialisation du M5Paper
m5epd.begin();
m5epd.updateBuffer();
// Configuration de la LED rouge (GPIO 40 sur M5Paper)
pinMode(40, OUTPUT);
}
void loop() {
digitalWrite(40, HIGH); // Allumer la LED
delay(500);
digitalWrite(40, LOW); // Éteindre la LED
delay(500);
}