GitHunt
EM

embedded4ever/CppQuizOrgButOnEink

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

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 E-paper device showing C++ quiz 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

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

๐Ÿง  How It Works

  • ESP32 boots and connects to Wi-Fi or creating AP to grab configurations at 192.168.4.1
  • 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 on Cloud

    • 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
  • Sofware on ESP32

    That one is optional, because of once wifi connection is failed, ESP32 will create Access Point.

    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"
  • 3D Case

    You can find some many different model to print from online 3d websites.

๐Ÿ“„ 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