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 to read pulses from.
Read a short series of pulses:
import bitbangio import board onewire = bitbangio.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
Write out a bit based on value.