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.
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: