Ks0245 keyestudio EASY plug Joystick Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
==EASY plug Joystick Module==
[[image:ks0245图.jpg|thumb|600px|right|EASY plug Joystick Module ]]
<br>[[File:KS0245-1.png|500px|frameless|thumb]]<br>


==Introduction==
==Introduction==
EASY plug Joystick Module needs to used with the EASY plug Control board V2.0 control board. The module is connected to the joystick module interface with one line, which is very easy and convenient. 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. <br>
Lots of robot projects need joystick. This module provides an affordable solution. <br>
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. <br>
This joystick module can be easily connect to EASY PLUG control board with only one cable. <br>


==Specification==
<span style=color:red> '''Special Note:''' <br>
* Supply Voltage:5V
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface. <br> If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module. </span><br>
* Interface: joystick module port
* Weight: 12.6g


==Connection Diagram ==
<br>
<br>[[File:KS0245-2.png|500px|frameless|thumb]]<br>


==Sample Code==
==Specifications==
<pre>
* Supply Voltage: 3.3V to 5V
int JoyStick_X = 6; //x
* Interface: Digital
int JoyStick_Y = 7; //y
int JoyStick_Z = 2; //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);
}
</pre>


==Result==
<br>
After connecting the power and burning the code, please open the serial monitor, and set the baud rate of 9600, turn the joystick, press the rocker button, and you can see the different value, as the diagram shown below.
==Technical Details==
<br>[[File:KS0245-3.png|500px|frameless|thumb]]<br>
* Dimensions: 45mm*28mm*33mm
* Weight: 12.5g
[[image:0245图片1.png|thumb|300px|right]]


<br>
==Connect It Up==
Connect the EASY Plug Joystick module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
<br>[[File:KS0245.jpg|500px|frameless|thumb]]<br>
<span style="color: red">'''Note:''' X-axis is connected to A6, Y-axis is connected to A7, Z-axis is default by D2  <br>
<br>
==Upload the Code==
<br>[[File:ks0398 14.1.png|600px|frameless|thumb]]<br>
<br>
==What You Should See==
<br>[[File:ks0398 14-1.png|500px|frameless|thumb]]<br>
<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600. If push the Joystick button towards different direction, you should get the different value. 
<br>[[File:ks0398 14-2.png|500px|frameless|thumb]]<br>
<br>
==Controlling LED Light==
<br>
'''Hookup Guide'''<br>
<br>[[File:遥感灯.jpg|500px|frameless|thumb]]<br>
<br>
'''Test Code'''<br>
<br>[[File:ks0398 14.2.png|600px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
Upload the code successfully, push the Joystick X-axis to downward, the LED light connected to D5 will become off. <br>
If push the Joystick Y-axis to leftward, the LED light connected to D6 will be turned off. Z-axis will control the LED light connected to D7.
<br>[[File:ks0398 14-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 14-4.png|500px|frameless|thumb]]<br>
<br>
==Resources ==
==Resources ==


'''File PDF:'''
https://fs.keyestudio.com/KS0245
 


https://drive.google.com/open?id=1bwMVB2CA3Q-XeBaUQEIpO-Wil4Yu_6pi
<br>


==Buy from ==
==Buy from ==
'''Official Website'''
*[https://www.keyestudio.com/keyestudio-easy-plug-ps2-joystick-module-for-arduino-steam-p0060-p0060.html  '''Official Website''' ]
 
*[https://www.aliexpress.com/store/product/Keyestudio-EASY-plug-Joystick-Module-for-Arduino/1452162_32819777041.html?spm=2114.12010612.8148356.14.79054ba7Qzl9Cv  Shop on aliexpress ]


http://www.keyestudio.com/easy-plug-joystick-module.html


[[category:EASY Plug]]
[[category:EASY Plug]]

Latest revision as of 08:38, 8 January 2021

EASY plug Joystick Module

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 connect to EASY PLUG control board with only one cable.

Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.


Specifications

  • Supply Voltage: 3.3V to 5V
  • Interface: Digital


Technical Details

  • Dimensions: 45mm*28mm*33mm
  • Weight: 12.5g
0245图片1.png


Connect It Up

Connect the EASY Plug Joystick module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb
Note: X-axis is connected to A6, Y-axis is connected to A7, Z-axis is default by D2


Upload the Code


thumb


What You Should See


thumb

Done uploading the code, open the serial monitor and set the baud rate to 9600. If push the Joystick button towards different direction, you should get the different value.
thumb


Controlling LED Light


Hookup Guide

thumb


Test Code

thumb


What You Should See
Upload the code successfully, push the Joystick X-axis to downward, the LED light connected to D5 will become off.
If push the Joystick Y-axis to leftward, the LED light connected to D6 will be turned off. Z-axis will control the LED light connected to D7.
thumb

thumb



Resources

https://fs.keyestudio.com/KS0245



Buy from