ESP32 · ESP8266 · Temirsiz
Butun dashboardni yigʻ birinchi sensor kelishidan oldin
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.
Jonli koʻr — fake’larda
Temirsiz, kutishsiz
Start the UI today — no breadboard, no soldering, no shipping delay. The dashboard looks and behaves live while you iterate on layout and logic.
Realistik, random emas
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.
Zero-Waste va koʻchma
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.
Uch qatorda butun muhit
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();
} Tayyor toʻplamlar
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 Nega haqiqiydek koʻrinadi
Kunlik profillar
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 marshrut pleybegi
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.
Record & replay
Capture a real signal once with RisalRecorder, then loop it back forever — reproduce an exact sensor trace in a demo or a regression test.
Har bir sensor preseti oʻz fake’iga ega.