+15
.cargo/config.toml
+15
.cargo/config.toml
···
···
+1
.gitignore
+1
.gitignore
···
···
+4
.vscode/settings.json
+4
.vscode/settings.json
+1351
Cargo.lock
+1351
Cargo.lock
···
···+source = "git+https://tangled.org/sachy.dev/sachy-embed-core#da0ffed807760563c59c9d6360190aaf028878a9"+source = "git+https://tangled.org/sachy.dev/sachy-embed-core#da0ffed807760563c59c9d6360190aaf028878a9"+source = "git+https://tangled.org/sachy.dev/sachy-embed-core#da0ffed807760563c59c9d6360190aaf028878a9"+source = "git+https://tangled.org/sachy.dev/sachy-embed-core#da0ffed807760563c59c9d6360190aaf028878a9"
+96
Cargo.toml
+96
Cargo.toml
···
···+sachy-battery = { git = "https://tangled.org/sachy.dev/sachy-embed-core", package = "sachy-battery" }+sachy-bthome = { git = "https://tangled.org/sachy.dev/sachy-embed-core", package = "sachy-bthome" }+sachy-shtc3 = { git = "https://tangled.org/sachy.dev/sachy-embed-core", package = "sachy-shtc3" }
+4
Embed.toml
+4
Embed.toml
+201
LICENSE-APACHE
+201
LICENSE-APACHE
···
···
+21
LICENSE-MIT
+21
LICENSE-MIT
···
···
+57
README.md
+57
README.md
···
···+[`b-parasite`](https://github.com/rbaron/b-parasite), the open source soil moisture and ambient temperature/humidity/light sensor, but in Rust!+Currently, this project has been tested only with the v2.0 of the sensor, making use of the NRF52840 chip. Other variations have not been used, though this could be added by others should they wish. Also, soil moisture calculations have been calibrated against boards that have had conformal coating applied to the capacitive sensor part of the board and further tweaking my still happen, so YMMV.+To compile, [you'll the latest rustc compiler](https://www.rust-lang.org/tools/install), `clang` 9.0 or later C compiler (due to C deps in the codebase), and a SWD debug probe to flash with (A Pico Debug Probe flashed with yapico firmware will work). Optional but highly recommended tool for flashing this board is a pogo pin clamp (6 pin version). These can be found cheap on AliExpress.+Once rust is installed, you'll need to use `rustup` to download the `nightly` toolchain with the `thumbv7em-none-eabihf` target:+Additionally, there's also at least one utility needed for compilation, `flip-link`. To install, run:+For flashing, you'll need `probe-rs`, so be sure to [follow the install instructions here](https://probe.rs/docs/getting-started/installation/). There will be [further setup required after installation](https://probe.rs/docs/getting-started/probe-setup/).+This should be enough to get you all the necessary tools in place for compiling and flashing your b-parasite board. To check everything compiles correctly, `cd` into the `para-firmware` folder and run the following:+This should build the firmware in debug mode and with `defmt` logging in place. To flash and log the debug build, ensure your debug probe is connected to the machine and the board and simply run the command:+This will run the compiler and then execute `probe-rs` to flash the chip with the compiled binary. All of the debug info/symbols are kept on the machine and are not flashed, only the actual executable will be flashed. This allows for very efficient debug logging via `defmt`, which decodes the format using the debug symbols.+This will ensure all debugging/logging code is not generated, nor any debug symbols. Once `probe-rs` flashes the device, you should see no logging output once the chip begins to run.+- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
+36
build.rs
+36
build.rs
···
···
+7
memory.x
+7
memory.x
+6
rust-toolchain.toml
+6
rust-toolchain.toml
+152
src/adc.rs
+152
src/adc.rs
···
···
+105
src/ble.rs
+105
src/ble.rs
···
···
+20
src/constants.rs
+20
src/constants.rs
···
···
+20
src/led.rs
+20
src/led.rs
···
···
+98
src/main.rs
+98
src/main.rs
···
···
+105
src/shtc3.rs
+105
src/shtc3.rs
···
···
+52
src/state.rs
+52
src/state.rs
···
···
+16
src/timer.rs
+16
src/timer.rs
···
···