Touch Screen Driver
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
ft5x06.FT5X06
class ft5x06.FT5X06(i2c_addr=0x38)Creates a touch screen controller object
Methods
FT5X06.get_gesture
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
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
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
FT5X06.get_point_id(index)This returns the current touch point id of the point at index.
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
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
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
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 pass None as the callback for this method.
FT5X06.update_points
FT5X06.update_points()This function reads the touch screen state and returns the number of touch points (0-5).
Constants
ft5x06.LCD_GESTURE_MOVE_UP
ft5x06.LCD_GESTURE_MOVE_UP: intTouch screen move up gesture.
ft5x06.LCD_GESTURE_MOVE_LEFT
ft5x06.LCD_GESTURE_MOVE_LEFT: intTouch screen move left gesture.
ft5x06.LCD_GESTURE_MOVE_DOWN
ft5x06.LCD_GESTURE_MOVE_DOWN: intTouch screen move down gesture.
ft5x06.LCD_GESTURE_MOVE_RIGHT
ft5x06.LCD_GESTURE_MOVE_RIGHT: intTouch screen move right gesture.
ft5x06.LCD_GESTURE_ZOOM_IN
ft5x06.LCD_GESTURE_ZOOM_IN: intTouch screen zoom in gesture.
ft5x06.LCD_GESTURE_ZOOM_OUT
ft5x06.LCD_GESTURE_ZOOM_OUT: intTouch screen zoom out gesture.
ft5x06.LCD_GESTURE_NONE
ft5x06.LCD_GESTURE_NONE: intTouch screen no gesture.
ft5x06.LCD_FLAG_PRESSED
ft5x06.LCD_FLAG_PRESSED: intTouch point is pressed.
ft5x06.LCD_FLAG_RELEASED
ft5x06.LCD_FLAG_RELEASED: intTouch point is released.
ft5x06.LCD_FLAG_MOVED
ft5x06.LCD_FLAG_MOVED: intTouch point is moved.
