File tree 1 file changed +2
-13
lines changed 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 8
8
"""
9
9
10
10
import time
11
- import busio
12
11
import board
13
12
from digitalio import DigitalInOut , Direction
14
13
import adafruit_focaltouch
15
14
16
15
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
-
26
16
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 )
17
+ i2c = board .I2C ()
29
18
30
19
# Setup the interrupt (IRQ) pin for input
31
- irq = DigitalInOut (board . IO39 )
20
+ irq = DigitalInOut (IRQ_pin )
32
21
irq .direction = Direction .INPUT
33
22
34
23
# Create library object (named "ft") using a Bus I2C port and using an interrupt pin (IRQ)
You can’t perform that action at this time.
0 commit comments