Difference between revisions of "Joystick PS2 Module"

From Wiki
Jump to: navigation, search
(Created page with "=='''Introduction'''== File:Joystick1.png The joystick PS2 module two lines of analog output (X, Y) and one of digital output (Z). The cross rocker is a bidirectional 10k...")
 
(Resource)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=='''Introduction'''==
 
=='''Introduction'''==
[[File:Joystick1.png]]
+
[[File:Joystick1.png]]<br>
 
The joystick PS2 module two lines of analog output (X, Y) and one of digital output (Z). The cross rocker is a bidirectional 10k resistor; its resistance changes with different directions. Push the joystick towards different directions and the voltage read increases or decreases; press it down, then the output is low level and the corresponding LED lights up; otherwise it stays off.<br>
 
The joystick PS2 module two lines of analog output (X, Y) and one of digital output (Z). The cross rocker is a bidirectional 10k resistor; its resistance changes with different directions. Push the joystick towards different directions and the voltage read increases or decreases; press it down, then the output is low level and the corresponding LED lights up; otherwise it stays off.<br>
 
The schematic diagram of the module is as follows:<br>
 
The schematic diagram of the module is as follows:<br>
Line 8: Line 8:
 
The module can be applied to convenient control of objects (like a two-degree of freedom servo mount) to move in a two-dimensional space. It can be used in the remote controller for many robot projects<br>
 
The module can be applied to convenient control of objects (like a two-degree of freedom servo mount) to move in a two-dimensional space. It can be used in the remote controller for many robot projects<br>
  
=='''Joystick PS2 in the experiment--Components'''==
+
=='''Resource'''==
- 1 * SunFounder Uno board <br>
+
[https://www.sunfounder.com/learn/Sensor-Kit-v2-0-for-Arduino/lesson-12-joystick-ps2-sensor-kit-v2-0-for-arduino.html Test Experiment for Arduino][[File:LINK.jpg]]<br>
- 1 * USB data cable<br>
+
[https://www.sunfounder.com/learn/sensor-kit-v2-0-for-raspberry-pi-b-plus/lesson-15-joystick-ps2-sensor-kit-v2-0-for-b-plus.html Test Experiment for Raspberry Pi][[File:LINK.jpg]]
- 1 * Joystick PS2 module<br>
+
- 1 * 5-Pin anti-reverse cable<br>
+
 
+
=='''Joystick PS2 in the experiment--Procedures'''==
+
Step 1: Build the circuit<br>
+
The wiring between the Joystick PS2 and SunFounder Uno board:<br>
+
[[File:Joystick3.png]]
+
[[File:Joystick4.png]]
+
Step 2: Program<br>  
+
Step 3: Compile <br>
+
Step 4: Upload the sketch to SunFounder Uno board<br>
+
Now, push the rocker and the coordinates of X and Y axes displayed on Serial Monitor will change accordingly; press the button, and the coordinate of Z=0 will also be displayed.<br>
+
[[File:Joystick5.jpg]]
+

Latest revision as of 02:12, 19 August 2017

Introduction

Joystick1.png
The joystick PS2 module two lines of analog output (X, Y) and one of digital output (Z). The cross rocker is a bidirectional 10k resistor; its resistance changes with different directions. Push the joystick towards different directions and the voltage read increases or decreases; press it down, then the output is low level and the corresponding LED lights up; otherwise it stays off.
The schematic diagram of the module is as follows:
Joystick2.png

Application

The module can be applied to convenient control of objects (like a two-degree of freedom servo mount) to move in a two-dimensional space. It can be used in the remote controller for many robot projects

Resource

Test Experiment for ArduinoLINK.jpg
Test Experiment for Raspberry PiLINK.jpg