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__(self) None ¶
Automatically deinitializes the hardware when exiting a context. See Lifetime and ContextManagers for more info.
- reset(self) bool ¶
Reset the OneWire bus and read presence
False when at least one device is present
- Return type