Product Manual
Joystick Plug
Updated on: 27th November 2017
Product Manual: Joystick Plug
Index About Elint Labz
2
Introduction
3
Specification
3
Variants
4
Supported cables
4
Details
4
How to interface?
5
Example Codes
7
Arduino
7
Contributors
8
Elint Labz (www.elintlabz.in)
Page 1 of 7
Product Manual: Joystick Plug
About Elint Labz Elint Labz (usually abbreviated as EL) is an electronics design & development tools designer & manufacturer with headquarters in Bengaluru, India. We design, develop & manufacture development boards based on micro-controller & microprocessors, breakout boards for various sensors & actuators. Our domain & expertise is in the area of Electronics & Embedded Systems. Elint Labz was founded in 2014 however the actual operations started from 2015 when it became a full time subsidiary of Hogst Innovative Solutions Pvt. Ltd. & is presently a part of Ajaramara Group a conglomerate of various domains of industries, registered in India as Ajaramara Dynamics Pvt. Ltd. under Companies Act of 2013. As in the name company (Elint Labz) – Electronic intelligence (ELINT) is intelligence gathered by the use of electronic sensors, Laboratories (LABZ) are facilities that provides controlled conditions in which scientific or technological research, experiments and measurement may be performed. EL is an enterprise built to develop smart & intelligent electronics & EL is committed to help achieve electronics literacy in India. No matter the vision or skill level, our products and resources are designed to make electronics & programmable development hardware more accessible. Elint Labz as a platform helps developers & young engineers from prototyping to product development. We provide open source hardware solutions and small quantity manufacturing services using a design from manufacturing framework. We are a strong promoter of the maker movement in India, most of the manufacturing happens with support of our various Indian partners & couple of our collaboration partners who have manufacturing & sourcing facilities in Germany, Korea & Shenzhen. To know more visit the about us section on our website: http://elintlabz.in/about-us/ Elint Labz (HQ) ˗ #200 1st main Arekere MICO layout 2nd stage Bengaluru 560076 KA [Marked on Google Maps] ✆ +91 855 377 2525 ː
[email protected]
Elint Labz (www.elintlabz.in)
Page 2 of 7
Product Manual: Joystick Plug
Introduction
This joystick is very similar to the ‘analog’ joysticks on PS2 (PlayStation 2) controllers. Directional movements are simply associated with two potentiometers - one for each axis. POTs are approximately 10kΩ each. This joystick also has a select button that is actuated when the joystick is pressed down. Elint Labz has built a plug using this joystick and it can be mounted anywhere using screws.
Specification ●
Operating voltage: 5V
● Size: 32mm x 35mm
Elint Labz (www.elintlabz.in)
Page 3 of 7
Product Manual: Joystick Plug
Variants ●
None
Supported cables ● 4-4A
Details
Joystick plug is a analog input device to the interfacing system. It has a interfacing port with five pins named as G, V, X, Y & D. Here G represents Ground , V represents VCC, X and Y represents the data pins. X gives the Horizontal movement values of Joystick and Y gives the vertical movement values of Joystick. D pin of the plug is not used in this PCB run. ● When the joystick is in the center position both X & Y data pins give middle values i.e., 512. ● When the joystick is at extreme left position X data pin gives 1023 value. ● When the joystick is at extreme right position X data pin gives 0 value. ● When the joystick is at extreme top position Y data pin gives 1023 value. ● When the joystick is at extreme bottom position Y data pin gives 0 value.
Elint Labz (www.elintlabz.in)
Page 4 of 7
Product Manual: Joystick Plug
How to interface?
Use 4-4A interfacing cables to connect this plug to the controller board. If 4-4A cable is to be used then any end of the cable can be connected to the Joystick plug. Always ensure that black wire of the cable is connected to the G pin on both ends. In the below given pictures you can see 4-4A cable is used to connect Joystick plug to the Pluguino Board. The data pins of the Joystick plug are connected to the A0 and A1 GPIO pin on the controller board.
Elint Labz (www.elintlabz.in)
Page 5 of 7
Product Manual: Joystick Plug
Elint Labz (www.elintlabz.in)
Page 6 of 7
Product Manual: Joystick Plug
In this example we are going read x-axis and y-axis values from the joystick plug and display it on the serial terminal.
Example Codes Arduino #define X A0 #define Y A1 unsigned int a; unsigned int b;
// // // //
use A0 pin to read X axis values use A1 pin to read Y axis values variable to store X axis values variable to store Y axis values
void setup() { Serial.begin(9600); // initialize serial transfer at 9600 bps } void loop() { a = analogRead(X); // reading the values in horizontal direction b = analogRead(Y); // reading the value in vertical direction Serial.print(“X= “); // printing string Serial.print(a); // print X values in serial monitor Serial.print("\t"); // printing spaces Serial.print(“Y= “); // printing string Serial.println(b); // print Y values in serial monitor Output video: https://youtu.be/5hToz-H2XsY
Elint Labz (www.elintlabz.in)
Page 7 of 7
Product Manual: Joystick Plug
Contributors List of interns & other contributors who have worked for developing this manual
Vamsidhar Reddy Vardana http://www.elintlabz.in/profile-1801
Elint Labz (www.elintlabz.in)
Page 8 of 7