OneWire implements the timing-sensitive foundation of the Maxim
(formerly Dallas Semi) OneWire protocol.
Protocol definition is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126
Create a OneWire object associated with the given pin. The object implements the lowest level timing-sensitive bits of the protocol.
Parameters: pin (Pin) – Pin connected to the OneWire bus
Read a short series of pulses:
import busio import board onewire = busio.OneWire(board.D7) onewire.reset() onewire.write_bit(True) onewire.write_bit(False) print(onewire.read_bit())
Deinitialize the OneWire bus and release any hardware resources for reuse.
No-op used by Context Managers.
Automatically deinitializes the hardware when exiting a context. See Lifetime and ContextManagers for more info.
Reset the OneWire bus and read presence
Returns: False when at least one device is present Return type: bool
Write out a bit based on value.