Your position: Home / Module / DC-DC module

Free shipping ! Keyestudio PS2 Joystick Module compatible with Arduino

KS0008
Price:
Wholesale:
5+
$2.38
    Please select the information you wantX
Quantity:
-
+
(877 available)
Shipping Cost:
to
Estimated Delivery Time:
Please select the country you want to ship from
  • Description
  • Reviews(78)

1324

Introduction

 

 
Lots of robot projects need joystick. This module provides an affordable solution. By simply connecting to two analog inputs, the robot is at your commands with X, Y control. It also has a switch that is connected to a digital pin. This joystick module can be easily connected to Arduino by IO Shield. 
 
 
Specification
 
  • Supply Voltage: 3.3V to 5V
  • Interface: Analog x2, Digital x1
Connection diagram
 
Please refer to the last photo in above photo window. 
 
Click to see product video: https://youtu.be/BsMeT7GNn9Y
 

Sample Code:

int JoyStick_X = 0; //x

int JoyStick_Y = 1; //y

int JoyStick_Z = 3; //key

void setup()

{

pinMode(JoyStick_Z, INPUT);

Serial.begin(9600); // 9600 bps

}

void loop()

{

int x,y,z;

x=analogRead(JoyStick_X);

y=analogRead(JoyStick_Y);

z=digitalRead(JoyStick_Z);

Serial.print(x ,DEC);

Serial.print(",");

Serial.print(y ,DEC);

Serial.print(",");

Serial.println(z ,DEC);

delay(100);

}

 
Average rating: 4.0 based on 78 reviews
Share your thoughts with other customers
Write a review
Product reviews can be carried out after the member login, please click here to login