onewire
onewire copied to clipboard
OneWire bus implementation in Rust using embedded-hal
I just want to read temperature from a DS18B20. If possible, I would prefer using avr-hal to interface with the board with this crate to interpret the readouts. Intuitively, I...
Pretty much what the title says. With very high probability I get Crc mismatch error. If I set parasite mode=true when initializing, it works perfectly - but the VCC of...
Currently the resolution field is private.
Eg: ```rust fn read( temp_sensor: &mut DS18B20, one_w: &mut OneWire, delay: &mut Delay, ) -> Self { let resolution = temp_sensor.measure_temperature(one_w, delay).unwrap(); delay.delay_ms(resolution.time_ms()); temp_sensor.read_temperature(one_w, delay).unwrap(); } ``` This doesn't work...
DelayUs - especially in loops - does not provide a consistent timing behavior (because of multiple calls with unknown timings in-between). The better solution would be to have something similar...
The example in the README is outdated. The `stm32f103xx-hal` is deprecated in favor of `stm32f1xx-hal`. It would also be nice to see the `use` statements used to get someone successfully...
This is the code: (pretty much the readme example, modified slightly for embassy) ``` #![no_std] #![no_main] #![feature(type_alias_impl_trait)] use embassy_executor::Spawner; use embassy_rp::gpio::{Input, Level, OutputOpenDrain, Pull, Flex}; use {defmt_rtt as _, panic_probe...
Using these functions would send the select rom command as data after the actual select rom command corrupting any actual data that was supposed to be read/written.
* Adds support for embedded-hal-1 traits. * Removes reduntant `select` which caused issues with DS18B20 sensor. If it was present sensor always returned 85 instead of normal temperature reading. *...
I'm new to rust so i just spent two days trying to make this work, this the only configuration that worked for me: [profile.dev] codegen-units = 2 debug = 0...