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 module ships the concrete DS3231RTC component implementation that talks to a DS3231 over I²C.

Drop the component into a prefab, 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<DS3231RTC>();
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 module (or add to this one).
  2. Implement IDekiRTC.
  3. Wrap it in a thin DekiComponent so it can be placed in a prefab.

No engine or editor changes required.