I used this joystick extension. As I'm new to this i just followed the instructions to get the values.