AT42QT1070 Class
- ID: at42qt1070
- Name: Seven-channel QTouch Touch Sensor
- Other Names: Grove QTouch Sensor
- Category: touch
- Manufacturer: seeed
- Connection: i2c
- Link: http://wiki.seeed.cc/Grove-Q_Touch_Sensor/
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.
Item Index
Methods
Properties
- REG_CHIPID
- REG_FWVERS
- REG_DETSTATUS
- REG_KEYSTATUS
- REG_KEYSIG0_H
- REG_KEYSIG0_L
- REG_KEYSIG1_H
- REG_KEYSIG1_L
- REG_KEYSIG2_H
- REG_KEYSIG2_L
- REG_KEYSIG3_H
- REG_KEYSIG3_L
- REG_KEYSIG4_H
- REG_KEYSIG4_L
- REG_KEYSIG5_H
- REG_KEYSIG5_L
- REG_KEYSIG6_H
- REG_KEYSIG6_L
- REG_REFDATA0_H
- REG_REFDATA0_L
- REG_REFDATA1_H
- REG_REFDATA1_L
- REG_REFDATA2_H
- REG_REFDATA2_L
- REG_REFDATA3_H
- REG_REFDATA3_L
- REG_REFDATA4_H
- REG_REFDATA4_L
- REG_REFDATA5_H
- REG_REFDATA5_L
- REG_REFDATA6_H
- REG_REFDATA6_L
- REG_NTHR0
- REG_NTHR1
- REG_NTHR2
- REG_NTHR3
- REG_NTHR4
- REG_NTHR5
- REG_NTHR6
- REG_AVE0
- REG_AVE1
- REG_AVE2
- REG_AVE3
- REG_AVE4
- REG_AVE5
- REG_AVE6
- REG_DI0
- REG_DI1
- REG_DI2
- REG_DI3
- REG_DI4
- REG_DI5
- REG_DI6
- REG_GUARD
- REG_LP
- REG_MAXON
- REG_CALIBRATE
- REG_RESET
- DET_TOUCH
- DET_OVERFLOW
- DET_CALIBRATE
Methods
AT42QT1070
-
bus
-
address
AT42QT1070 constructor
Parameters:
-
bus
NumberI2C bus to use
-
address
NumberAddress for this sensor
Returns:
writeByte
-
reg
-
byte
Writes a byte value into the register
Parameters:
-
reg
NumberRegister location to write into
-
byte
NumberByte to write
Returns:
True if successful
writeWord
-
reg
-
word
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
NumberRegister location to write into
-
word
NumberWord to write
Returns:
True if successful
readByte
-
reg
Read a byte value from the register
Parameters:
-
reg
NumberRegister location to read from
Returns:
Value in the specified register
readWord
-
reg
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
NumberRegister location to read from
Returns:
Value in the specified register
readChipID
()
Number
Reads the Chip ID register on the sensor
Returns:
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:
Low-power mode setting from the sensor
setLPMode
-
mode
Changes the low-pomer mode setting on the sensor
Parameters:
-
mode
NumberdDsired new mode
Returns:
New setting on the sensor
getAVE
-
key
Reads the current averaging factor setting for a key
Parameters:
-
key
NumberKey being read
Returns:
Averaging factor
setAVE
-
key
-
ave
Changes the averaging factor setting for a key
Parameters:
-
key
NumberKey being changed
-
ave
NumberNew averaging factor
Returns:
New averaging factor as read from the device
getAKSGroup
-
key
Reads the AKS group of which a key is part
Parameters:
-
key
NumberKey (0-6) being queried
Returns:
AKS group of which the key is part
setAKSGroup
-
key
-
group
Changes the AKS group of which a key is part
Parameters:
-
key
NumberKey (0-6) being changed
-
group
NumberNew group for the key
Returns:
New value on the sensor
isOverflowed
()
Boolean
Returns the overflow indicator
Returns:
True if overflow is indicated
isCalibrating
()
Boolean
Returns the calibrating indicator
Returns:
True if calibration is in progress
reset
()
Boolean
Issues a reset command
Returns:
True if successful
calibrate
()
Boolean
Issues a calibrate command
Returns:
True if successful
getButtons
()
Number
Gets the current button states
Returns:
Button states