🛠 Local automation with e-paper display

M5Stack PaperDIY Assembly Kit (ESP32-S3) · intermediaire · Configurez le PaperDIY comme un tableau de bord autonome pour afficher des données locales.

Objectifs

This tutorial aims to create an autonomous dashboard on the M5Stack PaperDIY. You will learn to read local data (simulated or via sensors) and display it on the ED047TC1 e-paper screen. The goal is to understand the interaction between flash storage, M5PM1 power management, and low-power display. We will not use WiFi for this step, favoring robust local logic.

Matériel nécessaire

Étapes

In Arduino IDE, select "M5Paper" or "ESP32-S3 Dev Module" card. Ensure PSRAM is enabled in compilation options, as the 960x540 16-level grayscale screen requires a significant buffer (8 MB PSRAM available).

  1. Environment Setup

Include necessary libraries. Code must initialize the e-paper display via the 8-bit parallel interface. Note that the screen does not refresh continuously like an LCD; it requires specific partial or full refresh commands.

  1. System Initialization
#include <M5Unified.h>

void setup() {
  M5.begin();
  M5.Display.setRotation(1);
  M5.Display.fillScreen(TFT_BLACK);
}

Create a function to update the screen. To simulate automation, increment a counter stored in flash memory (or a global variable for demo). Use M5.Display.drawString() to display data. To save the 140 mAh battery, add a deep sleep command between updates.

  1. Display and Storage Logic
int counter = 0;
void loop() {
  counter++;
  M5.Display.setCursor(10, 10);
  M5.Display.printf("Counter: %d\n", counter);
  M5.Display.update(); // Force e-paper refresh
  delay(5000); // Wait 5 seconds
}

The M5PM1 chip manages power. For real use, replace delay() with interrupts or deepSleep mode to preserve battery. The e-paper screen retains the image without power, ideal for static displays.

  1. Energy Optimization

Vérification

After upload, the screen should display a counter incrementing every 5 seconds. Verify the background remains black and text white (or vice versa depending on inversion). If the screen stays white, check parallel interface connections and PSRAM activation.

Pour aller plus loin

Integrate a DHT22 sensor to display temperature. Use WiFi 4 to sync time via NTP. Explore MicroSD card storage to save measurement history.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials