This project displays your daily LeetCode submission activity on an e-ink screen using the M5Stack CoreInk.
This project targets the M5Stack CoreInk. I enjoy tracking my progress — it’s motivating to see the work accumulate over time. That led me to build a small desktop dashboard to visualize my LeetCode activity. Since LeetCode submission data doesn't change frequently, updating a few times per day is enough. The low‑power, always‑visible nature of an e‑ink display makes it a great fit for passive tracking.
Current features include:
- Automatically fetch recent submission records from LeetCode (CN site) — no account login required.
- Smart scheduling: active during the day, sleeps at night (sleeps until 10:00).
- Intelligent updates: refresh only when new submissions are detected.
- Low power consumption via optimized Wi‑Fi usage.
Before compiling, you need to create a configuration file:
- Copy
src/config.h.exampletosrc/config.h. - Edit
src/config.hwith your settings:#define WIFI_SSID "Your_WiFi_SSID" #define WIFI_PASSWORD "Your_WiFi_Password" #define USERNAME "your-leetcode-username" // Optional: timezone and NTP servers #define NTP_TIMEZONE "JST-9" #define NTP_SERVER1 "ntp.nict.jp" #define NTP_SERVER2 "ntp.aliyun.com" #define NTP_SERVER3 "ntp1.aliyun.com"
Use PlatformIO to compile and upload the code to your M5Stack CoreInk.
- m5stack/M5GFX
- m5stack/M5Unified
- m5stack/M5Core-Ink (conflicts with M5Unified)
- bblanchon/ArduinoJson
- 如何在不登录的情况下获取LeetCode-CN用户提交记录
Use PlatformIO for this project.
-
Create a new project in PlatformIO.
-
Add the following libraries:
- m5stack/M5GFX@^0.2.6
- m5stack/M5Unified@^0.2.5
- bblanchon/ArduinoJson@^7.3.1
-
Copy the code from
src/main.cppinto your project (this repo uses a single editable file) and editsrc/config.h. -
Build and upload to your CoreInk.
Q:
How do I configure my own settings?
A:
// Edit src/config.h
#define WIFI_SSID "******"
#define WIFI_PASSWORD "******"
#define USERNAME "******" // Your LeetCode usernameIf necessary, handle any concerns around storing plaintext passwords yourself.
- 0.2.0 (Jul 15, 2025): Handled timeouts for LeetCode API requests.
- 0.1.0 (Apr 05, 2025): Initial release.
MIT License.
Questions or feedback are welcome: Shou Qiu [email protected].
