air_sensor: Replace thresholds with sample aggregation

This CL ditches the predefined VOC thresholds and instead keeps track of
the running mean and variance of a compensated air quality value. By
comparing the current value with statistics from aggregated past values,
it sets the LED color, e.g.
 * blue   (better than average)
 * cyan   (average)
 * green  (~1 standard deviations below average)
 * yellow (~2 standard deviations below average)
 * red    (3+ standard deviations below average)

Change-Id: Ida319a9699ff02bbfdc5fb240f9bf55a8bcedb95
Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/showcase/rp2/+/72654
Presubmit-Verified: CQ Bot Account <pigweed-internal-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Aaron Green <aarongreen@google.com>
12 files changed
tree: c01b2b0cb1c2c0cc173c0cd45cec50908a4e8b84
  1. .github/
  2. .vscode/
  3. apps/
  4. device/
  5. modules/
  6. system/
  7. targets/
  8. tools/
  9. web_app/
  10. .bazelignore
  11. .bazelrc
  12. .bazelversion
  13. .clang-format
  14. .clangd.shared
  15. .gitignore
  16. .pw_console.yaml
  17. AUTHORS
  18. BUILD.bazel
  19. CONTRIBUTING.md
  20. LICENSE
  21. MODULE.bazel
  22. OWNERS
  23. pigweed.json
  24. README.md
README.md

Pigweed Open Source Template Repository

This repository is a template that we will use when creating new open source repositories for Pigweed.