Skip to content

Hourly display new CppQuiz.org questions on an ESP32-powered e-ink screen. Lightweight and perfect for passive C++ learning

Notifications You must be signed in to change notification settings

embedded4ever/CppQuizOrgButOnEink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project displays a daily C++ quiz question from cppquiz.org on an e-paper display powered by an ESP32 microcontroller. Questions are fetched via Google Apps Script connected to a Google Sheets backend, then rendered with clean formatting on a 7.5" E-Ink screen.

E-paper device showing C++ quiz

🚀 Features

  • Displays C++ quiz question from a Google Sheet
  • Works offline by caching the last successful question
  • Uses deep sleep to save power (wakes up every hour)
  • Shows Wi-Fi status for shown question (connected/disconnected) with an icon
  • Fully customizable via Google Sheets + Apps Script backend

📦 Hardware

  • ESP32
  • Waveshare ESP32 Epaper Driver Board
  • Waveshare 7.5" E-Paper Display

🧠 How It Works

  • ESP32 boots and connects to Wi-Fi.
  • It sends an HTTP request to a Google Apps Script endpoint.
  • The Apps Script reads a unshown question from Google Sheets and returns it as plain text.
  • ESP32 displays the question on the e-paper screen.
  • If Wi-Fi fails, it loads the last cached question.
  • Device goes into deep sleep and repeats after one hour.

🎉 To Build Yourself

  • Software

    • Upload an Excel file (questions.xlsx) to Google Drive
    • Open it with Google Sheets
    • In your Google Sheet:
      • Click Extensions > Apps Script
      • Paste the code.gs (code.gs)
    • Deploy the script as a Web App
    • Set access to "Anyone with the link"
    • Update code.gs (code.gs):
      var sheet_id = "YOUR_GOOGLE_SHEET_ID"; //Excel
  • Hardware

    Update config.h (config.h)on ESP32 firmware:

    const std::string WIFI_SSID         = "YOUR_WIFI_SSID";
    const std::string WIFI_PWD          = "YOUR_WIFI_PWD"
    const std::string GS_DEPLOYMENT_ID  = "YOUR_GS_DEPLOYMENT_ID"

📄 Why Use an Excel File?

The questions displayed on this device are sourced from cppquiz.org, which provides a comprehensive collection of C++ questions. However, the site does not offer an API to fetch individual questions by ID.

Instead, all questions are made available as a bulk JSON file at:

https://static.cppquiz.org/published.json

Due to the size of this dataset and the need for easier navigation, filtering, and tracking of displayed questions, I chose to manage the content through a Google Sheets with Google App Script.

Buy Me A Coffee

About

Hourly display new CppQuiz.org questions on an ESP32-powered e-ink screen. Lightweight and perfect for passive C++ learning

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages