feat(wsen-hids): Add examples.#160
Open
Charly-sketch wants to merge 4 commits into
Open
Conversation
- ComfortZone : Classify environment as comfortable/dry/humid using temperature-humidity chart - DewPointMonitor : Calculate and display dew point, warn when condensation risk is high - HumidityAlert : Trigger buzzer when humidity exceeds a threshold (mold prevention)
7 tasks
Contributor
|
@Charly-sketch Titre ! |
There was a problem hiding this comment.
Pull request overview
Adds several new real-world Arduino example sketches for the WSEN-HIDS driver and updates the driver README to reference them, helping users adopt the sensor in practical scenarios (alerts, condensation monitoring, comfort classification).
Changes:
- Added three new standalone example sketches:
HumidityAlert,DewPointMonitor, andComfortZone. - Updated
lib/wsen-hids/README.mdexamples table to reference the expanded set of sketches.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| lib/wsen-hids/examples/HumidityAlert/HumidityAlert.ino | New humidity-threshold alert example using buzzer. |
| lib/wsen-hids/examples/DewPointMonitor/DewPointMonitor.ino | New dew point / condensation risk example. |
| lib/wsen-hids/examples/ComfortZone/ComfortZone.ino | New comfort classification example based on temp/RH. |
| lib/wsen-hids/README.md | Updated examples table to mention new sketches. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Example names are now consistent with their directory names (e.g. BasicReader) Fixed the typo BasicRead → BasicReader Table entries now link directly to the example directories Naming aligned with the expected structure (examples/<ExampleName>/<ExampleName>.ino) as defined in the contributing guidelines
DEWPOINT : Humidity can indeed reach 0%, which would result in log(0) and produce -inf. We now clamp the humidity to a small positive value before applying the logarithm to ensure numerical stability. setContinuous() currently expects a frequency in Hz (e.g. 1, 7), while WsenHidsConst::ODR_* values represent register bitfields. Passing WsenHidsConst::ODR_1HZ works by coincidence (value = 1), but would be incorrect for other values like ODR_7HZ. COMFORT ZONE : setContinuous() currently expects a frequency in Hz (e.g. 1, 7), while WsenHidsConst::ODR_* values represent register bitfields. Passing WsenHidsConst::ODR_1HZ works by coincidence (value = 1), but would be incorrect for other values like ODR_7HZ. HUMIDITY_ALERT: setContinuous() currently expects a frequency in Hz (e.g. 1, 7), while WsenHidsConst::ODR_* values represent register bitfields. Passing WsenHidsConst::ODR_1HZ works by coincidence (value = 1), but would be incorrect for other values like ODR_7HZ.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds multiple standalone real-world Arduino example sketches for the WSEN-HIDS humidity and temperature sensor driver, covering environmental alerting, condensation monitoring, and comfort classification scenarios. Closes #158.
The DAPLink-backed persistent logging example has been split into a dedicated follow-up issue: relates to #159.
Depens on #131
Changes
Added
HumidityAlertexample:Added
DewPointMonitorexample:Added
ComfortZoneexample:Kept
BasicReaderas the baseline serial environmental readout exampleUpdated
README.mdexample table and usage documentation to reference the new sketchesDeferred
HumidityLoggerpersistent flash logging example to follow-up DAPLink integration issue examples(wsen-hids): Add practical usage examples with daplink. #159Checklist
make lintpasses (clang-format)make buildpasses (PlatformIO)make test-nativepasses (if native tests exist)make test-hardwarepasses on a connected STeaMi (if hardware tests exist)