We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help, I can't figure out how to transfer the sensor value to the web interface. You can use a detailed example with an explanation.
The text was updated successfully, but these errors were encountered:
@JonyBest It is described in the docs how to update a state and push a new value to the web interface: https://theelims.github.io/ESP32-sveltekit/statefulservice/#read-update-state
You could define your sensor class
class SensorState { public: uint32_t sensorValue = 255; // remaining code like in the lightstate example };
and update it in your Arduino loop()-function
void loop() { uint32_t readSensor = sensor.read(); sensorStateService.update([&](SensorState& state) { state.sensorValue = readSensor; return StateUpdateResult::CHANGED; }, "loop"); delay(100); }
Sorry, something went wrong.
No branches or pull requests
Help, I can't figure out how to transfer the sensor value to the web interface. You can use a detailed example with an explanation.
The text was updated successfully, but these errors were encountered: