Skip to content

Commit 3392cde

Browse files
authored
Update focaltouch_print_touches_with_irq.py
1 parent 12032f7 commit 3392cde

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

examples/focaltouch_print_touches_with_irq.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,11 @@
1414
import adafruit_focaltouch
1515

1616

17-
if hasattr(
18-
board, "SCL"
19-
): # if SCL and SDA pins are defined by the board definition, use them.
20-
SCL_pin = board.SCL
21-
SDA_pin = board.SDA
22-
else:
23-
SCL_pin = board.IO42 # set to a pin that you want to use for SCL
24-
SDA_pin = board.IO41 # set to a pin that you want to use for SDA
25-
2617
IRQ_pin = board.IO39 # select a pin to connect to the display's interrupt pin ("IRQ")
27-
28-
i2c = busio.I2C(SCL_pin, SDA_pin)
18+
i2c = board.I2C()
2919

3020
# Setup the interrupt (IRQ) pin for input
31-
irq = DigitalInOut(board.IO39)
21+
irq = DigitalInOut(IRQ_pin)
3222
irq.direction = Direction.INPUT
3323

3424
# Create library object (named "ft") using a Bus I2C port and using an interrupt pin (IRQ)

0 commit comments

Comments
 (0)