From 3392cde0b03ab663d60c64557b409497834fa151 Mon Sep 17 00:00:00 2001 From: "Limor \"Ladyada\" Fried" Date: Tue, 4 Jul 2023 18:27:40 -0400 Subject: [PATCH 1/2] Update focaltouch_print_touches_with_irq.py --- examples/focaltouch_print_touches_with_irq.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/examples/focaltouch_print_touches_with_irq.py b/examples/focaltouch_print_touches_with_irq.py index 2b896f8..ca03b93 100644 --- a/examples/focaltouch_print_touches_with_irq.py +++ b/examples/focaltouch_print_touches_with_irq.py @@ -14,21 +14,11 @@ import adafruit_focaltouch -if hasattr( - board, "SCL" -): # if SCL and SDA pins are defined by the board definition, use them. - SCL_pin = board.SCL - SDA_pin = board.SDA -else: - SCL_pin = board.IO42 # set to a pin that you want to use for SCL - SDA_pin = board.IO41 # set to a pin that you want to use for SDA - IRQ_pin = board.IO39 # select a pin to connect to the display's interrupt pin ("IRQ") - -i2c = busio.I2C(SCL_pin, SDA_pin) +i2c = board.I2C() # Setup the interrupt (IRQ) pin for input -irq = DigitalInOut(board.IO39) +irq = DigitalInOut(IRQ_pin) irq.direction = Direction.INPUT # Create library object (named "ft") using a Bus I2C port and using an interrupt pin (IRQ) From 287f9e8b6afe37d295aab3e9719b16a5d5602863 Mon Sep 17 00:00:00 2001 From: Kattni Date: Wed, 12 Jul 2023 19:15:19 -0400 Subject: [PATCH 2/2] Remove unused import --- examples/focaltouch_print_touches_with_irq.py | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/focaltouch_print_touches_with_irq.py b/examples/focaltouch_print_touches_with_irq.py index ca03b93..0eb0d59 100644 --- a/examples/focaltouch_print_touches_with_irq.py +++ b/examples/focaltouch_print_touches_with_irq.py @@ -8,7 +8,6 @@ """ import time -import busio import board from digitalio import DigitalInOut, Direction import adafruit_focaltouch