RisalDash RisalDash

ESP32 · ESP8266 · بلا عتاد

ابنِ لوحة التحكّم كاملةً قبل وصول أوّل حسّاس

RisalFake is a header-only fake-sensor library for ESP32 and Arduino. It feeds your widgets realistic, drifting readings — a slow trend plus wobble plus a little noise, following a day-cycle rather than a flat sine — so you can design, debug and demo a complete UI with nothing plugged in. When the real sensor lands, swap one line.

شاهدها تعمل — على الوهميّات

Greenhouse — RisalFakeEnv on a day-cycle
GPS Tracker — RisalFakeGPS on the live map

بلا عتاد وبلا انتظار

Start the UI today — no breadboard, no soldering, no shipping delay. The dashboard looks and behaves live while you iterate on layout and logic.

واقعيّ لا عشوائيّ

Values drift on a virtual day-cycle with gentle noise — a greenhouse warms by afternoon, a battery sags under load — so charts and gauges look like a real deployment, not a jittery line.

بلا هدر وقابل للنقل

Opt-in and header-only: nothing is compiled unless you include it, and it depends on Arduino.h + math.h alone. Same code builds on ESP8266 and ESP32.

بيئة كاملة في ثلاثة أسطر

The fake drives the same variables your real driver will. When the BME280 arrives, replace the three env.*() reads — the rest of the sketch is unchanged.

#include <RisalUI.h>
#include <RisalFake.h>          // opt-in: nothing is compiled unless you include it

RisalUI dash("Greenhouse");
RisalFakeEnv env;               // a whole environment — no wires, no sensors
float temp, hum, pres;

void setup() {
  dash.gauge("Temp", &temp, 0, 50, "C");
  dash.metric("Humidity", &hum, "%");
  dash.chart("Pressure", &pres);
  dash.beginAP("RisalDash", "12345678");
  env.begin();
}

void loop() {
  dash.update();
  env.update();
  temp = env.temperature();     // when the BME280 arrives: bme.readTemperature();
  hum  = env.humidity();
  pres = env.pressure();
}

حزم جاهزة

Each class fills a themed set of values you bind straight to widgets. Mix them, or use plain RisalFake for any single quantity.

RisalFake one drifting value → any widget
RisalFakeEnv temp · humidity · pressure · soil · light
RisalFakeWeather wind · gust · direction · rain · UV
RisalFakePower V · A · W · kWh (household load)
RisalFakeAir PM1/2.5/10 · CO₂ · VOC · NOx
RisalFakeIMU pitch · roll · yaw · compass
RisalFakeWeight HX711 load cell, settles on items
RisalFakeBattery SoC · pack V · current · temp
RisalFakeFlow flow rate · total litres
RisalFakeHealth heart rate · SpO₂
RisalFakeGas smoke / CO alarm with trips
RisalFakeGPS a waypoint route → the map widget
RisalFakeBLE a fake nearby-device scan
RisalRecorder record a real trace, replay forever

لماذا يبدو حقيقيًّا

ملامح يوميّة

Readings follow a virtual clock (one day ≈ 3 minutes): light rises and falls, temperature lags the sun, air quality drifts. Not random — a believable trend.

تشغيل مسار GPS

RisalFakeGPS flies a waypoint loop, interpolating between points at a varying speed, and drives the live map widget — a moving marker with no GPS module.

تسجيل وإعادة

Capture a real signal once with RisalRecorder, then loop it back forever — reproduce an exact sensor trace in a demo or a regression test.

لكلّ إعداد حسّاس نظيرٌ وهميّ.