https://github.com/yvanseth/scd40-rusty-pi
A SCD40 (or 41) CO2 PPM Monitor with Web Interface for Raspberry Pi Pico W
https://github.com/yvanseth/scd40-rusty-pi
co2 co2-monitor co2-sensor embassy-rp embassy-rs libscd pico-w raspberry-pi scd40
Last synced: about 1 month ago
JSON representation
A SCD40 (or 41) CO2 PPM Monitor with Web Interface for Raspberry Pi Pico W
- Host: GitHub
- URL: https://github.com/yvanseth/scd40-rusty-pi
- Owner: YvanSeth
- License: apache-2.0
- Created: 2025-03-17T13:10:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T13:51:39.000Z (about 1 year ago)
- Last Synced: 2025-03-17T14:38:44.745Z (about 1 year ago)
- Topics: co2, co2-monitor, co2-sensor, embassy-rp, embassy-rs, libscd, pico-w, raspberry-pi, scd40
- Language: Rust
- Homepage:
- Size: 186 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# scd40-rusty-pi

A Raspberry Pi Pico W implementation of a SCD40 based CO2 PPM monitor, it has a
web interface where the current values can be viewed. This is designed to work
with an I2C SCD40 module.
Please note that I am on about day 5 of learning Rust, so this code is not
provided with the intention of it being a correct example to follow. Comments
and feedback are welcomed! This is part of my own learning process.
***This is a work in progress.***

## Compiling - picoserve mod
I struggled to get `embassy` + `picoserve` to compile together using crates.io
sources. Despite the version number of `embassy` being the same it seems that
using the git sources fixes the problem (the issue is with
`embassy-time-driver`). But to achieve this I had to also edit the
`picoserve/Cargo.toml` in the `picoserve` project, which I have checked out and
sat alongside this project tree and referenced directly in this project's
`Cargo.toml`. Hopefully in time the issue with the crates.io compatibility will
be resolved.
```diff
diff --git a/picoserve/Cargo.toml b/picoserve/Cargo.toml
index 5bb0084..c9ad350 100644
--- a/picoserve/Cargo.toml
+++ b/picoserve/Cargo.toml
@@ -20,2 +20,2 @@ defmt = { version = "0.3.6", optional = true }
-embassy-net = { version = ">=0.6.0", optional = true, features = ["tcp", "proto-ipv4", "medium-ethernet"] }
-embassy-time = { version = ">=0.4.0", optional = true }
+embassy-net = { version = "0.7.0", git = "https://github.com/embassy-rs/embassy.git", optional = true, features = ["tcp", "proto-ipv4", "medium-ethernet"] }
+embassy-time = { version = "0.4.0", git = "https://github.com/embassy-rs/embassy.git", optional = true }
```
## License
`scd40-rusty-pi` is licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.