Split this into two problems
- Read a joystick button press and store the result in some variable
- Read the variable and send a message to the Arduino
I can’t help with the second part but there are examples that come with the GCP library and a number of videos on my website about using this library.