onewireio
– Low-level bit primitives for Maxim (formerly Dallas Semi) one-wire protocol.
Protocol definition is here: https://www.analog.com/en/technical-articles/1wire-communication-through-software.html
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.
- Parameters:
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.