Description
PS2 game joystick axis sensor module consists of using original quality metal PS2 joystick potentiometer system For the (X, Y) a 2-axis analog output and for (Z) 1 digital output channel button.
Features:
- Quality rocker, long life, stable performance
- Highly reliable and compact sized
- Two analog outputs, digital outputs
- X, Y-axis output of two potentiometers can be read through the AD converter twist angle
- Press down on the joystick, touch switches can be deployed all the way, as a digital output, has a pull-up
- Applies to two degrees of freedom, or other remote PTZ control servo proportional control
- Suitable for arduino platform compatible arduino sensor interface
Getting started with the Joystick Module and Arduino
in this tutorial we are going to see how to connect the Joystick module on the arduino and how to read x and y data from the module. firstly we need to to know how the joystick module operates. so try to rotate it and as you make rotation your changing the resistance of the two variable resistor, you can them one on the right side another on the back side that is the principle of operation of the joystick module
Step1: Hardware required
Step2: Hardware connection
As we know when something varies with time ( as the time change also it change the value) that is an analog signal to read the analog signal on the arduino we need to use the analog pins, so connect the joystick module as shown below
After connecting the the Joystick on the arduino UNO, we are going to make a sketch that will read analog values and print them in the serial monitor
Step3: Making the sketch and Testing
We made a sample sketch that uses analogRead(); function, this function will read the analog values from the pins A0 and A1 and print them to the serial monitor, so you can download a sample sketch here. upload the sketch and open the serial monitor you will get the value like shown below
you can do many thing using the this Joystick module such as motor speed control, light brightness control, even a joystick……….
Step4:Documents
You can download all the documents we used for this tutorial here