upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Classes | Public Member Functions | List of all members

API for the Atmel AT42QT1070 QTouch Sensor. More...

Detailed Description

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

Classes

class  AT42QT1070_DET_T
 
class  AT42QT1070_REG_T
 

Public Member Functions

synchronized void delete ()
 
 AT42QT1070 (int bus, short address)
 
 AT42QT1070 (int bus)
 
boolean writeByte (short reg, short arg1)
 
boolean writeWord (short reg, int word)
 
short readByte (short reg)
 
int readWord (short reg)
 
short readChipID ()
 
void updateState ()
 
short getLPMode ()
 
short setLPMode (short mode)
 
short getAVE (short key)
 
short setAVE (short key, short ave)
 
short getAKSGroup (short key)
 
short setAKSGroup (short key, short group)
 
boolean isOverflowed ()
 
boolean isCalibrating ()
 
boolean reset ()
 
boolean calibrate ()
 
short getButtons ()
 

Constructor & Destructor Documentation

AT42QT1070 ( int  bus,
short  address 
)

AT42QT1070 constructor

Parameters
busI2C bus to use
addressAddress for this sensor

Member Function Documentation

boolean calibrate ( )

Issues a calibrate command

Returns
True if successful
short getAKSGroup ( short  key)

Reads the AKS group of which a key is part

Parameters
keyKey (0-6) being queried
Returns
AKS group of which the key is part
short getAVE ( short  key)

Reads the current averaging factor setting for a key

Parameters
keyKey being read
Returns
Averaging factor
short getButtons ( )

Gets the current button states

Returns
Button states
boolean isCalibrating ( )

Returns the calibrating indicator

Returns
True if calibration is in progress
boolean isOverflowed ( )

Returns the overflow indicator

Returns
True if overflow is indicated
short readByte ( short  reg)

Read a byte value from the register

Parameters
regRegister location to read from
Returns
Value in the specified register
int readWord ( short  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
regRegister location to read from
Returns
Value in the specified register
boolean reset ( )

Issues a reset command

Returns
True if successful
short setAKSGroup ( short  key,
short  group 
)

Changes the AKS group of which a key is part

Parameters
keyKey (0-6) being changed
groupNew group for the key
Returns
New value on the sensor
short setAVE ( short  key,
short  ave 
)

Changes the averaging factor setting for a key

Parameters
keyKey being changed
aveNew averaging factor
Returns
New averaging factor as read from the device
short setLPMode ( short  mode)

Changes the low-pomer mode setting on the sensor

Parameters
modedDsired new mode
Returns
New setting on the sensor
void updateState ( )

Reads the current touch status and detection state

Returns
Key status bits for all keys (0-6)
boolean writeByte ( short  reg,
short  arg1 
)

Writes a byte value into the register

Parameters
regRegister location to write into
byteByte to write
Returns
True if successful
boolean writeWord ( short  reg,
int  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
regRegister location to write into
wordWord to write
Returns
True if successful

The documentation for this class was generated from the following file: