Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 3c84197

Browse files
dhylandsdpgeorge
authored andcommitted
drivers/onewire: Enable pull up on data pin.
The driver seems to be be enabling the pullup resistor in most places, but not this one. Making this one little change allows onewire devices to be used with no external pullup resistor.
1 parent 3d96201 commit 3c84197

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/onewire/onewire.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self, pin):
6060

6161
# cache a bunch of methods and attributes. This is necessary in _write_bit and
6262
# _read_bit to achieve the timing required by the OneWire protocol.
63-
self.cache = (pin.init, pin.value, pin.OUT_PP, pin.IN, pin.PULL_NONE)
63+
self.cache = (pin.init, pin.value, pin.OUT_PP, pin.IN, pin.PULL_UP)
6464

6565
pin.init(pin.IN, pin.PULL_UP)
6666

0 commit comments

Comments
 (0)