Skip to content

Commit

Permalink
Add touch home button method
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Dec 23, 2024
1 parent fa7f369 commit a178d64
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/CapacitiveTouch/CapacitiveTouch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ void setup()
}
}
}

// Press the circular touch button on the screen to get the coordinate point,
// and set it as the coordinate of the touch button
// T-Display-S3 CST816 touch panel, touch button coordinates are is 85 , 160
touch.setCenterButtonCoordinate(85, 360);

// Depending on the touch panel, not all touch panels have touch buttons.
touch.setHomeButtonCallback([](void *user_data) {
Serial.println("Home key pressed!");
}, NULL);

// tft.setSwapBytes(true);
tft.pushColors((uint16_t *)image, tft.width() * tft.height(), true);
Expand Down

0 comments on commit a178d64

Please sign in to comment.