-40%

Joystick module KY-023 PS2 Dual axis XY two axis Arduino Raspberry electronics

$ 1.27

Availability: 21 in stock
  • Condition: New
  • Brand: - Unbranded//Generic -
  • Modified article: Nope
  • Country/Region of Manufacture: China
  • Set announcement: Nope
  • Quantity of units: 1
  • Unit type: Unit

    Description

    KY-023 PS2 Dual axis Joystick module two axes (XY )
    Description:
    Two-axis joystick sensor module by using PS2 rocker potentiometer, with (X, Y) 2-axis digital output, (Z) 1 button. With the Arduino sensor expansion board you can produce remote control and other interactive work. In addition, this product to allow customers more easily with the arduino expansion board And other standard interfaces, in the layout of X, Y, Z axis of the circuit are separate wires, the user can use a special ARDUINO 3-pin line that actually plugs into the expansion board.
    Product performance:
    Input voltage range: DC 3.3V to 5V
    Output signal: the digital output Y module special bidirectional analog output, the output value corresponding to (X, Y) biaxial offset; when the user presses the Z axis, its type is digital switch.
    The cross joystick is a bidirectional 10K resistor, with the rocker in different directions, the resistance varies with the change. This module uses a 5V power supply, the original state of X, Y reading voltage of 2.5V or so, when pressed with the arrow direction,. The reading voltage value increases with the maximum at 5V; Arrows in the opposite direction to press, on
    condition
    neutral consumption is 0V.
    Tutorial:
    In fact, this module is a potentiometer, the x,y dimensional data of the output port gives analog voltage reading. This figure does not draw the above z-dimensional data output, z-dimensional output only 0 and 1, can be achieved with a button. All in all, it is a combination of potentiometer and button. In the Arduino use it, x, and DIMENSIONS we receive two analog ports to read their values, while the z-dimensional we are connected to the digital port, connected to power and ground.
    Test program:
    intJoyStick_X = 0; // x
    int JoyStick_Y = 1; // Y
    int JoyStick_Z = 3; // wrench
    voidSetup() { pinMode(JoyStick_X, input);
    PinMode(JoyStick_Y, input);
    PinMode(JoyStick_Z, input);
    Series. Start (9600); // 9600bps}
    Y = analogRead(JoyStick_Y); z = digitalRead(JoyStick_Z); void loop() { int x, y, z;
    Serial.print(x,DEC); Serial.print( ",");
    Serial.print(y,DEC); Serial.print( ",");
    Serial.println(z,DEC);