Skip to content
New issue

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

Rain sensor trigger log and reading calculation #55

Merged
merged 1 commit into from
Sep 4, 2022

Conversation

lowfatcode
Copy link
Member

Rain sensor trigger events are now logged in rain.txt in the filesystem. This log is kept to under 4096 bytes (one filesystem block) in length.

The log entries are used to determine the rainfall in millimetres over the past hour.

@lowfatcode lowfatcode merged commit 05fefa7 into main Sep 4, 2022
@lowfatcode lowfatcode deleted the bug/rain-sensor-readings branch September 4, 2022 04:25
rtyley added a commit to rtyley/enviro that referenced this pull request Sep 23, 2023
Both `startup()` and `check_trigger()` were using identical code
to append a new entry to the `rain.txt` trigger log (introduced with
pimoroni#55) when a pulse from the
rain sensor is detected - this refactor introduces a new
`store_rain_trigger_record()` method, meaning the code only needs
to be in one place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant