onewireio – Low-level bit primitives for Maxim (formerly Dallas Semi) one-wire protocol.
Protocol definition is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126
Available on these boards
- class onewireio.OneWire(pin: microcontroller.Pin)
Create a OneWire object associated with the given pin.
The object implements the lowest level timing-sensitive bits of the protocol.
pin (Pin) – Pin connected to the OneWire bus
Read a short series of pulses:
import onewireio import board onewire = onewireio.OneWire(board.D7) onewire.reset() onewire.write_bit(True) onewire.write_bit(False) print(onewire.read_bit())
- __exit__() None
Automatically deinitializes the hardware when exiting a context. See Lifetime and ContextManagers for more info.
- reset() bool
Reset the OneWire bus and read presence
False when at least one device is present
- Return type: