ft5x06 — Touch Screen Driver¶
The ft5x06 module provides a driver for the FT5x06 capacitive touch screen
controller used on the OpenMV Pure Thermal.
class FT5X06 – Touch Screen Controller¶
- class ft5x06.FT5X06(i2c_addr: int = 0x38)¶
Creates a touch screen controller object.
i2c_addris the I2C address of the FT5x06 controller.- get_gesture() int¶
Returns the current gesture. The return value is one of the
ft5x06.GESTURE_*constants.When a callback is registered via
FT5X06.touch_callback()this method should only be called from within the callback.
- get_points() int¶
Returns the current number of touch points (0-5).
When a callback is registered via
FT5X06.touch_callback()this method should only be called from within the callback.
- get_point_flag(index: int) int¶
Returns the current state of the touch point at
index(0-4). The return value is one of theft5x06.FLAG_*constants.When a callback is registered via
FT5X06.touch_callback()this method should only be called from within the callback.
- get_point_id(index: int) int¶
Returns the id of the touch point at
index(0-4). The id is a numeric value that allows tracking a touch point across updates as points are added and removed.When a callback is registered via
FT5X06.touch_callback()this method should only be called from within the callback.
- get_point_x(index: int) int¶
Returns the x pixel position of the touch point at
index(0-4).When a callback is registered via
FT5X06.touch_callback()this method should only be called from within the callback.
- get_point_y(index: int) int¶
Returns the y pixel position of the touch point at
index(0-4).When a callback is registered via
FT5X06.touch_callback()this method should only be called from within the callback.
- touch_callback(callback: object) None¶
Registers
callbackto be invoked on a touch event. The callback receives one argument: the current number of touch points (0-5).Pass
Noneascallbackto disable the callback. While a callback is registered, do not callFT5X06.update_points()outside of the callback.