![2in1 usb joystick rumble 2in1 usb joystick rumble](https://www.picclickimg.com/d/l400/pict/174907450438_/Saitek-P2600-Rumble-Force-Gamepad-USB-PC-Controller.jpg)
To follow this tutorial you need the following components: Hardware components: Arduino Uno Analog Joystick Technical Specifications Operating Voltageġ.57 in x 1.02 in x 1.26 in (4.0 cm x 2.6 cm x 3.2 cm)įor more information, you can check out the datasheet here: KY-023 Datasheet Things used in this tutorial If you don’t need the button then you can use only 4 pins. GND – Connect this to your ground line (GND). SW (KEY or SEL) – This is the digital output from the pushbutton, normally open, will connect to GND when the button is pushed. HORIZ (vrX) – This is the horizontal analog output voltage (will be about half of VCC when the joystick is centered). VERT (vrY) – This is the vertical analog output voltage (will be about half of VCC when the joystick is centered). VCC (5v) – Connect this to your positive supply (usually 5V or 3.3V depending on your logic levels). I’ve described the corresponding pin names for various manufacturers below. Analog Joystick Analog Joystick Analog Joystick Be aware that the notation might be different in your module. The module has 5 pins: VCC, GND, HORIZ, VERT, SEL. Meaning when the joystick is in the center, the X and Y coordinate values might be in a range from 490 to 530 and not exactly 512. That’s because the joystick handle doesn’t always return exactly to the central location, so you have to take this into account when programming the handle’s central location as a small range of values, not a specific one.
![2in1 usb joystick rumble 2in1 usb joystick rumble](https://gzhls.at/i/07/93/210793-m0.jpg)
The KY-023 joystick model has its own deficiencies. When connected to analog ports, VRx to A0 and VRy to A1 respectively, they should transmit the values as shown in the image below. The value on every analog channel can vary from 0 to 1023. When the joystick is released, it smoothly returns to its central (0) location. The handle’s angle rotates the regulators and changes the output voltage letting it monitor the handle’s gradient from the central spot. The analog joystick has a handle that is attached to the joint with two regulators that determine the joysticks location on the X and Y-axes and the button on the Z-axis.
2in1 usb joystick rumble how to#
In this lesson, I’ll show you how to use the analog joystick module with Arduino Uno.
![2in1 usb joystick rumble 2in1 usb joystick rumble](https://img.joomcdn.net/55b85606372dc50bcea4fd2df9d6ae6a2f4f8b51_original.jpeg)
Connecting a joystick to Arduino will let you remotely control a machine or robot with Arduino.