Mperipheral

deki-rtc

Real-time clock peripheral. Read and write wall-clock time from a scene component, with a DS3231 (I²C) backend.

chip
DS3231
bus
I²C

What it does

deki-rtc exposes a real-time clock as a scene component. The engine defines the abstract IDekiRTC provider interface in its core; this package ships the concrete DS3231RTCComponent that talks to a DS3231 over I²C, alongside a SystemClockRTCComponent that reads the host clock so a scene keeps working in the editor.

Drop the component into a scene, point it at the I²C bus declared by deki-i2c, and you can read or set wall-clock time from any behaviour:

auto* rtc = root->GetComponentInChildren<DS3231RTCComponent>();
auto now = rtc->GetTime();
rtc->SetTime({2026, 5, 24, 14, 30, 0});

Adding a different RTC chip

The provider abstraction (IDekiRTC) lives in the engine core. To support a new clock chip:

  1. Create a new package (or add to this one).
  2. Implement IDekiRTC.
  3. Wrap it in a thin Deki::Component so it can be placed in a scene.

No engine or editor changes required.