Closed vojty closed 1 year ago
so after more debugging, I've got this output:
CRC8 validation failed for [9, 171, 84] (expected 54, calculated e9)
CRC8 validation failed for [109, 59, 187] (expected bb, calculated 41)
CRC8 validation failed for [124, 40, 49] (expected 31, calculated c1)
CO2: 2475, Temperature: 29.67 °C, Humidity: 48.50 RH,
The CRC calculation is somehow wrong but if I try the calculation from https://github.com/Sensirion/sensirion-i2c-rs/blob/master/src/crc8.rs#L11-L25 in the Rust playground, it works well. Don't really know what's going on here 🤷♂️
Hmm i have no clue. I will look at it. Which ESP board do you use?
I dug a little more and it looks like a problem with Rust + ESP32. I've raised an issue here https://github.com/esp-rs/rust-build/issues/162 I don't think it's related to this library, so feel free to close it.
This should now be fixed with the 1.65.0.0 release, grab a compiler here: https://github.com/esp-rs/rust-build/releases/tag/v1.65.0.0
Originally posted by @MabezDev in https://github.com/esp-rs/rust/issues/134#issuecomment-1302269376
Hey, I'm trying to use SCD41 + ESP32 with this library, however, I'm getting a CRC error using this piece of code:
If I comment out this line https://github.com/Sensirion/sensirion-i2c-rs/blob/master/src/i2c.rs#L68 then it starts working, including reading the measures. Am I missing something? Can I opt-out of the CRC validation somehow?