Problem with Game Control Plus library button pressed

please format code with </> button * homework policy * asking questions

Hi I’m new to processing and trying to control my robot arm using an USB game controller(armor3 wired controller) through processing.
While using the Game Control Plus library, I successfully moved the robot using the joysticks, but the buttons do not work. Pretty sure there is nothing wrong with the settings set at the configuration
any suggestions?
my code is as below;

import processing.serial.*;

import org.gamecontrolplus.
import org.gamecontrolplus.gui.*;

import cc.arduino.;
import org.firmata.

ControlDevice cont;
ControlIO control;
ControlButton origin;


I assume you mean the buttons on the joystick.

I suggest that you plug the joystick into your computer and then run the Gcp_Configurator program that comes with the library. Select the joystick from the list of devices and confirm that the configurator recognises and responds to the buttons. If it doesn’t then there is nothing you can do,

If it does recognise the joystick buttons the I suggest you create a new simple sketch (without Arduino) that simply reads the joystick buttons and prints out some value. Once you get that to work you should be able to get your sketch to work.

More info about GCP can be wound on my website.

Hi, Thanks for the reply.
The configurator does recognize and respond to the buttons. (When pressing the buttons while running the configurator, the red light on the congifurator’s blocks blink) Therefore I assumed that my game controller and Processing were successfully connected and the error is in my codes.
I did try a simple code that prints a certain string when the button is pressed, as I wrote above, but nothing happens.
Is there something wrong with the code above? If not, is there nothing I can do to fix this error?
Thank you.