#include <GxEPD2_BW.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include <WiFi.h>
#include <HTTPClient.h>
// WiFi credentials
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";
// E-paper display instance (change the model as per your e-paper display)
GxEPD2_BW<GxEPD2_290, GxEPD2_290::HEIGHT> display(GxEPD2_290(/*CS=*/ 15, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));
void setup() {
Serial.begin(115200);
// Initialize e-paper display
display.init(115200);
display.setRotation(1);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
// Display message
displayMessage("Hello, ESL!");
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000); // Wait for 1 second
// Turn LED off (LOW)
digitalWrite(LED_BUILTIN, LOW);
delay(1000); // Wait for 1 second
}
void displayMessage(const char* message) {
display.setFullWindow();
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
display.setTextColor(GxEPD_BLACK);
display.setFont(&FreeMonoBold9pt7b);
display.setCursor(0, 30);
display.print(message);
} while (display.nextPage());
}
Loading
esp32-s2-devkitm-1
esp32-s2-devkitm-1
Loading
epaper-2in9
epaper-2in9