🛠 Connected Weather Station with M5Stack PaperDIY

M5Stack PaperDIY Complete Kit ESP32-S3 e-paper Development Kit · intermediaire · Créez une station météo autonome affichant les données en temps réel sur l'écran e-paper via WiFi.

Objectives

This tutorial aims to configure the M5Stack PaperDIY Complete Kit as a connected weather station. You will learn to initialize the ED047TC1 e-paper display, establish a stable WiFi connection, and retrieve weather data via a web API to display it on the grayscale screen. This project demonstrates power management and network communication on the ESP32-S3.

Materials Needed

Steps

  1. Environment Setup : Open Arduino IDE, go to Library Manager, and install “M5Unified” and “M5GFX”. Select “M5Stack-ATOMS3” or “ESP32-S3 Dev Module” as the board model, with 16MB Flash and Octal PSRAM enabled.
  1. Display Initialization : The ED047TC1 screen uses an 8-bit parallel interface. Use the M5GFX library to initialize the display. Note that e-paper updates are slow; avoid frequent full refreshes to preserve the 140mAh battery.
#include <M5GFX.h>
M5GFX display;
void setup() {
  display.begin();
  display.setRotation(0);
  display.fillScreen(GRAY4_0);
}
  1. WiFi Connection : Use the WiFi.h library to connect the ESP32-S3 to the network. The M5PM1 chip manages power, but ensure deep sleep is disabled during connection. Handle connection errors with multiple retries.
#include <WiFi.h>
const char* ssid = "YourSSID";
const char* pass = "YourPassword";
void connectWiFi() {
  WiFi.begin(ssid, pass);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }
}
  1. Data Retrieval : Use HTTPClient to query the weather API. Parse the JSON response to extract temperature and conditions. The integrated PCB antenna provides adequate range for home use.
  1. Data Display : Convert data into simple text or graphics. The screen offers 16 grayscale levels; use shades to create readable weather icons without color.

Verification

Open the serial monitor at 115200 bauds. You should see WiFi connection messages and received JSON data. On the screen, weather information must appear clearly. Ensure the screen does not remain active permanently to save battery.

Further Learning

Integrate a Deep Sleep mode between updates to extend the 140mAh battery life. You can also add a physical button to force an immediate update or use the MicroSD card to log temperature history locally.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials