UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

AT42QT1070 Class

Module: at42qt1070

This class implements support for the Atmel AT42QT1070 QTouch sensor, which supports 7 capacitive buttons.
It was developed using a Grove-Q Touch Sensor board.
at42qt1070.jpg

Methods

AT42QT1070

(
  • bus
  • address
)
Number

AT42QT1070 constructor

Parameters:

  • bus Number

    I2C bus to use

  • address Number

    Address for this sensor

Returns:

Number:

writeByte

(
  • reg
  • byte
)
Boolean

Writes a byte value into the register

Parameters:

  • reg Number

    Register location to write into

  • byte Number

    Byte to write

Returns:

Boolean:

True if successful

writeWord

(
  • reg
  • word
)
Boolean

Writes a word value into the register. Note: the device must have the auto-increment bit set in the MODE1 register to work.

Parameters:

  • reg Number

    Register location to write into

  • word Number

    Word to write

Returns:

Boolean:

True if successful

readByte

(
  • reg
)
Number

Read a byte value from the register

Parameters:

  • reg Number

    Register location to read from

Returns:

Number:

Value in the specified register

readWord

(
  • reg
)
Number

Read a word value from the register. Note: the device must have the auto-increment bit set in the MODE1 register to work.

Parameters:

  • reg Number

    Register location to read from

Returns:

Number:

Value in the specified register

readChipID

() Number

Reads the Chip ID register on the sensor

Returns:

Number:

Value of the Chip ID register

updateState

()

Reads the current touch status and detection state

getLPMode

() Number

Reads the current low-power mode setting

Returns:

Number:

Low-power mode setting from the sensor

setLPMode

(
  • mode
)
Number

Changes the low-pomer mode setting on the sensor

Parameters:

  • mode Number

    dDsired new mode

Returns:

Number:

New setting on the sensor

getAVE

(
  • key
)
Number

Reads the current averaging factor setting for a key

Parameters:

  • key Number

    Key being read

Returns:

Number:

Averaging factor

setAVE

(
  • key
  • ave
)
Number

Changes the averaging factor setting for a key

Parameters:

  • key Number

    Key being changed

  • ave Number

    New averaging factor

Returns:

Number:

New averaging factor as read from the device

getAKSGroup

(
  • key
)
Number

Reads the AKS group of which a key is part

Parameters:

  • key Number

    Key (0-6) being queried

Returns:

Number:

AKS group of which the key is part

setAKSGroup

(
  • key
  • group
)
Number

Changes the AKS group of which a key is part

Parameters:

  • key Number

    Key (0-6) being changed

  • group Number

    New group for the key

Returns:

Number:

New value on the sensor

isOverflowed

() Boolean

Returns the overflow indicator

Returns:

Boolean:

True if overflow is indicated

isCalibrating

() Boolean

Returns the calibrating indicator

Returns:

Boolean:

True if calibration is in progress

reset

() Boolean

Issues a reset command

Returns:

Boolean:

True if successful

calibrate

() Boolean

Issues a calibrate command

Returns:

Boolean:

True if successful

getButtons

() Number

Gets the current button states

Returns:

Number:

Button states

Properties

REG_CHIPID

Enum AT42QT1070_REG_T

REG_FWVERS

Enum AT42QT1070_REG_T

REG_DETSTATUS

Enum AT42QT1070_REG_T

REG_KEYSTATUS

Enum AT42QT1070_REG_T

REG_KEYSIG0_H

Enum AT42QT1070_REG_T

REG_KEYSIG0_L

Enum AT42QT1070_REG_T

REG_KEYSIG1_H

Enum AT42QT1070_REG_T

REG_KEYSIG1_L

Enum AT42QT1070_REG_T

REG_KEYSIG2_H

Enum AT42QT1070_REG_T

REG_KEYSIG2_L

Enum AT42QT1070_REG_T

REG_KEYSIG3_H

Enum AT42QT1070_REG_T

REG_KEYSIG3_L

Enum AT42QT1070_REG_T

REG_KEYSIG4_H

Enum AT42QT1070_REG_T

REG_KEYSIG4_L

Enum AT42QT1070_REG_T

REG_KEYSIG5_H

Enum AT42QT1070_REG_T

REG_KEYSIG5_L

Enum AT42QT1070_REG_T

REG_KEYSIG6_H

Enum AT42QT1070_REG_T

REG_KEYSIG6_L

Enum AT42QT1070_REG_T

REG_REFDATA0_H

Enum AT42QT1070_REG_T

REG_REFDATA0_L

Enum AT42QT1070_REG_T

REG_REFDATA1_H

Enum AT42QT1070_REG_T

REG_REFDATA1_L

Enum AT42QT1070_REG_T

REG_REFDATA2_H

Enum AT42QT1070_REG_T

REG_REFDATA2_L

Enum AT42QT1070_REG_T

REG_REFDATA3_H

Enum AT42QT1070_REG_T

REG_REFDATA3_L

Enum AT42QT1070_REG_T

REG_REFDATA4_H

Enum AT42QT1070_REG_T

REG_REFDATA4_L

Enum AT42QT1070_REG_T

REG_REFDATA5_H

Enum AT42QT1070_REG_T

REG_REFDATA5_L

Enum AT42QT1070_REG_T

REG_REFDATA6_H

Enum AT42QT1070_REG_T

REG_REFDATA6_L

Enum AT42QT1070_REG_T

REG_NTHR0

Enum AT42QT1070_REG_T

REG_NTHR1

Enum AT42QT1070_REG_T

REG_NTHR2

Enum AT42QT1070_REG_T

REG_NTHR3

Enum AT42QT1070_REG_T

REG_NTHR4

Enum AT42QT1070_REG_T

REG_NTHR5

Enum AT42QT1070_REG_T

REG_NTHR6

Enum AT42QT1070_REG_T

REG_AVE0

Enum AT42QT1070_REG_T

REG_AVE1

Enum AT42QT1070_REG_T

REG_AVE2

Enum AT42QT1070_REG_T

REG_AVE3

Enum AT42QT1070_REG_T

REG_AVE4

Enum AT42QT1070_REG_T

REG_AVE5

Enum AT42QT1070_REG_T

REG_AVE6

Enum AT42QT1070_REG_T

REG_DI0

Enum AT42QT1070_REG_T

REG_DI1

Enum AT42QT1070_REG_T

REG_DI2

Enum AT42QT1070_REG_T

REG_DI3

Enum AT42QT1070_REG_T

REG_DI4

Enum AT42QT1070_REG_T

REG_DI5

Enum AT42QT1070_REG_T

REG_DI6

Enum AT42QT1070_REG_T

REG_GUARD

Enum AT42QT1070_REG_T

REG_LP

Enum AT42QT1070_REG_T

REG_MAXON

Enum AT42QT1070_REG_T

REG_CALIBRATE

Enum AT42QT1070_REG_T

REG_RESET

Enum AT42QT1070_REG_T

DET_TOUCH

Enum AT42QT1070_DET_T

DET_OVERFLOW

Enum AT42QT1070_DET_T

DET_CALIBRATE

Enum AT42QT1070_DET_T