This repository has been archived by the owner on Dec 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Touch_getXY()
Mammad900 edited this page Aug 29, 2020
·
1 revision
Reads touch screen data (it is a touch screen 'driver').
Updates pixel_x, pixel_y, and pixel_z values.
pixel_x and pixel_y contain the position of the touched area.
pixel_z contains the pressure. Pressure of ~800 means a slight touch and a pressure of 50 means a hard touch.
None
If TFT screen is being touched, returns true
. Else, returns false
.
void loop(){
if(Touch_getXY()){
int radius = map(pixel_z, 800, 50, 1, 10);
tft.drawCircle(pixel_x,pixel_y,radius,TFT_WHITE);
}
}
Turns your hand into a marker.
Actually this function is written by the creator of MCUFRIEND_kbv
library and exists in it's examples. I selected the best one (which existed in touch_shield_new
) and added debouncing functionality to it