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.
- 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
- ESP32
- Waveshare ESP32 Epaper Driver Board
- Waveshare 7.5" E-Paper Display
- 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.
-
- 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
-
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"
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.