PinnacleTouch API¶
Data Modes¶
Allowed symbols for configuring the Pinnacle ASIC’s data reporting/measurements.
These are used as valid values for PinnacleTouch.data_mode
.
-
circuitpython_cirque_pinnacle.PINNACLE_RELATIVE : int =
0
¶ A mode to measure changes in X & Y axis positions. See Relative or Absolute mode API.
-
circuitpython_cirque_pinnacle.PINNACLE_ANYMEAS : int =
1
¶ A mode for raw ADC measurements. See AnyMeas mode API.
-
circuitpython_cirque_pinnacle.PINNACLE_ABSOLUTE : int =
2
¶ A mode to measure X, Y, & Z axis positions. See Relative or Absolute mode API.
PinnacleTouch class¶
-
class circuitpython_cirque_pinnacle.PinnacleTouch(dr_pin: DigitalInOut | None =
None
)[source]¶ The abstract base class for driving the Pinnacle ASIC.
- Parameters¶
- dr_pin: DigitalInOut | None =
None
¶ The input pin connected to the Pinnacle ASIC’s “Data Ready” pin. If this parameter is not specified, then the SW_DR (software data ready) flag of the STATUS register is used to determine if the data being reported is new.
Important
This parameter must be specified if your application is going to use the Pinnacle ASIC’s
PINNACLE_ANYMEAS
mode (a rather experimental measuring of raw ADC values).
- dr_pin: DigitalInOut | None =
- data_mode¶
This attribute controls the mode for which kind of data to report. The supported modes are
PINNACLE_RELATIVE
,PINNACLE_ANYMEAS
,PINNACLE_ABSOLUTE
. Default isPINNACLE_RELATIVE
.Important
When switching from
PINNACLE_ANYMEAS
toPINNACLE_RELATIVE
orPINNACLE_ABSOLUTE
, all configurations are reset, and must be re-configured by usingabsolute_mode_config()
orrelative_mode_config()
.
SPI & I2C Interfaces¶
-
class circuitpython_cirque_pinnacle.PinnacleTouchSPI(spi: SPI, ss_pin: DigitalInOut, spi_frequency: int =
13000000
, dr_pin: DigitalInOut | None =None
)[source]¶ Bases:
PinnacleTouch
A derived class for interfacing with the Pinnacle ASIC via the SPI protocol.
- Parameters¶
- spi: SPI¶
The object of the SPI bus to use. This object must be shared among other driver classes that use the same SPI bus (MOSI, MISO, & SCK pins).
- ss_pin: DigitalInOut¶
The “slave select” pin output to the Pinnacle ASIC.
- spi_frequency: int =
13000000
¶ The SPI bus speed in Hz. Default is the maximum 13 MHz.
- dr_pin: DigitalInOut | None =
None
¶ The input pin connected to the Pinnacle ASIC’s “Data Ready” pin. If this parameter is not specified, then the SW_DR (software data ready) flag of the STATUS register is used to determine if the data being reported is new.
Important
This parameter must be specified if your application is going to use the Pinnacle ASIC’s
PINNACLE_ANYMEAS
mode (a rather experimental measuring of raw ADC values).
-
class circuitpython_cirque_pinnacle.PinnacleTouchI2C(i2c: I2C, address: int =
42
, dr_pin: DigitalInOut | None =None
)[source]¶ Bases:
PinnacleTouch
A derived class for interfacing with the Pinnacle ASIC via the I2C protocol.
- Parameters¶
- i2c: I2C¶
The object of the I2C bus to use. This object must be shared among other driver classes that use the same I2C bus (SDA & SCL pins).
- address: int =
42
¶ The slave I2C address of the Pinnacle ASIC. Defaults to
0x2A
.- dr_pin: DigitalInOut | None =
None
¶ The input pin connected to the Pinnacle ASIC’s “Data Ready” pin. If this parameter is not specified, then the SW_DR (software data ready) flag of the STATUS register is used to determine if the data being reported is new.
Important
This parameter must be specified if your application is going to use the Pinnacle ASIC’s
PINNACLE_ANYMEAS
mode (a rather experimental measuring of raw ADC values).