Crate onecable

Crate onecable 

Source
Expand description

§OneCable

onecable is an implementation of the 1-Wire protocol, and is currently focussed of supporting the DS18B20 temperature sensor.

§How to use?

First, create a OneWire instance with OneWire::new, then you can discover the ROM codes of the connected devices with e.g. OneWire::search_rom_iter. If you have only one device connected to the OneWire bus, you can also use OneWire::read_rom to read the ROM code of that device.

Once you have a valid ROM code, you can convert it to a DS18B20 sensor instance with ds18b20::DS18B20::try_from.

Modules§

crc
ds18b20
rom_code
search_rom
wirelock

Structs§

OneWire
Represents the OneWire bus.

Enums§

FamilyCodeError
OneWireError