ft5x06
— Touch Screen Driver¶
Touch Screen Driver for the OpenMV Pure Thermal.
Note
This will be refactored to be under the display module soon.
Constructors¶
- class ft5x06.FT5X06(i2c_addr=0x38)¶
Creates a touch screen controller object
Methods¶
- FT5X06.get_gesture()¶
This is one of LCD_GESTURE_*.
When a callback is enabled for the touch screen this method should not be called anymore except inside of the callback.
- FT5X06.get_points()¶
This returns the current number of touch points (0-5).
When a callback is enabled for the touch screen this method should not be called anymore except inside of the callback.
- FT5X06.get_point_flag(index)¶
This returns the current touch point state of the point at
index
.This is one of LCD_FLAG_*.
When a callback is enabled for the touch screen this method should not be called anymore except inside of the callback.
- FT5X06.get_point_id(index)¶
This returns the current touch point
id
of the point atindex
.The touch point
id
is a numeric value that allows you to track a touch point as it may move around in list of touch points returned as points are added and removed.When a callback is enabled for the touch screen this method should not be called anymore except inside of the callback.
- FT5X06.get_point_x(index)¶
This returns the current touch point x position of the point at
index
.This is the x pixel position of the touch point on the screen.
When a callback is enabled for the touch screen this method should not be called anymore except inside of the callback.
- FT5X06.get_point_y(index)¶
This returns the current touch point y position of the point at
index
.This is the y pixel position of the touch point on the screen.
When a callback is enabled for the touch screen this method should not be called anymore except inside of the callback.
- FT5X06.touch_callback(callback)¶
This method registers a callback which will receive the number of touch points (0-5) when a touch event happens.
If you use this method do not call
FT5X06.update_points()
anymore until the callback is disabled by passNone
as the callback for this method.
- FT5X06.update_points()¶
This function reads the touch screen state and returns the number of touch points (0-5).