Skip to content

Commit 0ff4058

Browse files
authored
Merge pull request #79 from perja12/perja/internal_pull_up
Add optional parameter for using internal pull-up for int1
2 parents 6791d3f + d72b75d commit 0ff4058

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_lis3dh.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ def __init__(
129129
self._int2 = int2
130130
if self._int1:
131131
self._int1.direction = digitalio.Direction.INPUT
132-
self._int1.pull = digitalio.Pull.UP
132+
try:
133+
self._int1.pull = digitalio.Pull.UP
134+
except AttributeError:
135+
pass
133136

134137
@property
135138
def data_rate(

0 commit comments

Comments
 (0)