bme680 icon indicating copy to clipboard operation
bme680 copied to clipboard

fix example for reading_temperature.rs

Open dnutiu opened this issue 2 years ago • 3 comments

I'm new to Rust so sorry if I make mistakes.

It seems like the crate from crates.io is not synced to the Github repo and in order to get the example to compile I had to tweak it, please see the PR.

I also had to use the following line in my Cargo.toml.

bme680 = {git = "https://github.com/marcelbuesing/bme680.git", version = "0.6.0"}

dnutiu avatar Feb 24 '24 20:02 dnutiu

nice to see to have migrated to embedded hal 1.0.0

One thing:

for no_std that is required on eg STM32 the linux-embedded-hal should be put to dev-dependencies and not to the regular one.

And the other thing is, anyhow needs to be switched to no_std via:

[dependencies]
anyhow = { version = "1.0", default-features = false }

shufps avatar Jun 01 '24 14:06 shufps

Hello @shufps

Thank you for taking the time to review my PR! I've stopped working on this for the moment, but this is a nice opportunity for anyone who wants to get involved to implement the changes.

dnutiu avatar Jun 02 '24 07:06 dnutiu

I used your PR successfully on a STM32 with embassy, works very well, thx a lot for this :raised_hands:

Especially because embedded-hal 1.0.0 is used by embassy and it would have required work to migrate it from the alpha.

You saved me a lot of time :smiling_face_with_three_hearts:

shufps avatar Jun 04 '24 08:06 shufps