Develop
Build a time-aware screen
An Einq app is firmware logic that decides what to draw and when to refresh e-paper. The canonical example: show the current time and weekday, re-render on the hour, and swap layout or copy at day boundaries.
1. Hardware & stack
Xteink X4 (ESP32-C3, 4.3″ e-paper). Einq is not a reader — no book UI. Firmware
uses the open
X4 community SDK
(display, buttons, power). CrossPoint was optional bring-up; new apps live in this repo under
apps/.
2. Programming model
- Render — compose a framebuffer (text, bitmaps, simple shapes). E-paper likes high contrast and infrequent updates.
- Schedule — wake on RTC alarm, timer, or light sleep until the next boundary (hour, sunrise, cron rule).
- Refresh policy — partial refresh when only digits change; full refresh at day change or ghosting threshold.
- Power — deep sleep between updates; WiFi only when syncing content.
3. Sketch: screen as f(day, time)
Pseudocode for a clock face app:
void loop() {
DateTime now = rtc.now();
if (needs_full_refresh(now)) {
draw_day_header(now); // weekday, optional quote
draw_time_large(now);
eink.fullUpdate();
} else if (minute_changed(now)) {
draw_time_large(now); // partial update region
eink.partialUpdate(time_region);
}
sleep_until(next_event(now)); // e.g. next hour or next minute
}
Event next_event(DateTime t) {
if (t.minute() == 0) return top_of_hour(t);
return next_minute(t);
}
Real implementations live in PlatformIO/C++ against CrossPoint’s display drivers. We will add a
reference app under apps/clock-face/ as the tree matures.
4. Repo layout
einq/
apps/ # one folder per Einq app
firmware/ # shared helpers, board notes
docs/ # this site
5. Contribute
Open issues and PRs on CastaliaInstitute/einq. For CrossPoint bugs or reader features, contribute upstream.