This document defines the ECMAScript class supporting the FT6x06 capacitive touch panel controller from FocalTech.
This class specification conforms to the Touch Sensor Class of ECMA-419, ECMAScript® Embedded Systems API Specification.
- FocalTech FT6x06 data sheet
- FocalTech FT6x06 application note and register map
- ECMA-419, ECMAScript® Embedded Systems API Specification
Module Specifier: embedded:sensor/touch/FT6x06
The FT6X06
Sensor Class extends the Touch
Sensor Class with additional properties on the options objects passed to the configure
method and returned by the sample
method.
Property | Description |
---|---|
sensor |
An I2C class constructor options object with the configuration of the I2C controller connected to the FT6x06. This property is required. |
interrupt |
A Digital class constructor options object with the configuration of the FT6x06 interrupt pin. This property is required for instances that use the onSample callback. |
reset |
A Digital class constructor options object with the configuration of the FT6x06 reset pin. This property is optional. If present, a hardware reset is performed when the class is instantiated. |
onSample |
Callback to invoke when touch points are available from the sample method. This property is required if interrupt is provided. |
All of the following properties are optional.
Property | Description |
---|---|
length |
Number specifying the number of touch points to track with the controller. Range is 1 to 2 . Initial value is 2 . |
threshold |
Number specifying the threshold for touch detection. Range is 0 to 255 . Initial value is 128 . |
flip |
A String indicating whether the sampled touch points should be flipped horizontally or vertically. Allowed values are "none" , "h" , "v" , and "hv" . Initial value is "none" . |
active |
Boolean specifying if the FT6x06 will remain in Active Mode when there is no touching. Initial value is false . |
timeout |
Number specifying the number of milliseconds the device should stay in Active Mode when there is no touching. Range is 0 to 255 . Initial value is 10 . |
weight |
Boolean specifying if touch point weights will be included in samples. Initial value is false . |
area |
Boolean specifying if touch point areas will be included in samples. Initial value is false . |
The length
property of sample object has a range of 1
to 2
.
FT6X06
implements the sample array specified in the Touch
Sensor Class and extends the touch
object described in the Touch
Sensor Class to include the following properties.
Property | Description |
---|---|
weight |
Number indicating the weight of the touch. Range is 0 to 255 . |
area |
Number indicating the area of the touch. Range is 0 to 15 . |
These properties are included in the touch
object only if weight
and area
, respectively, have been configured to true
via the configure
method.
Property | Description |
---|---|
x |
Number indicating the X coordinate of the touch point |
y |
Number indicating the Y coordinate of the touch point |
id |
Number indicating which touch point this entry corresponds to |