Cytron Technologies Shield­-PS2 User Manual

Cytron Technologies Shield­-PS2 User Manual

Hide thumbs Also See for Shield­-PS2:

Advertisement

Quick Links

ROBOT . HEAD to TOE
                                                                    
Product User's Manual – Shield­PS2
Shield­PS2
Cytron PS2 Shield
User's Manual
V1.0
September 2013
1
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Shield­-PS2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Cytron Technologies Shield­-PS2

  • Page 1 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Shield­PS2 Cytron PS2 Shield User's Manual V1.0 September 2013 Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 2 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Index Introduction and Overview Packing List Product Specification and Limitations Board and Product Layout Hardware Interface       5.1   Choose SONY PS2 Dual Shock Controller Protocol       6.1  PS2 Button and joystick status       6.2   On Board vibrator motor control       6.3   All PS2 button and joystick status Warranty Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 3: Introduction And Overview

    ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2  1.0 INTRODUCTION AND OVERVIEW Cytron PS2 Shield (SHIELD­PS2) is an Arduino compatible shield which is compatible with                         Arduino UNO, Arduino Duemilanove, Arduino Mega, Arduino Leonardo and possibly other pin  ...
  • Page 4: Packing List

    ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 2.0 PACKING LIST 1. 1 x Shield­PS2 2. 3 x mini jumper 3. User’s manual, and sample source code can be downloaded from  http://www.cytron.com.my. Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 5: Product Specification And Limitations

    ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 3.0 PRODUCT SPECIFICATION AND LIMITATIONS Dimensions Parameters Typical Max Unit Input Voltage (Logic Operation Voltage) ­ Current Consumption  (Logic Input – High Level)  (Logic Input – Low Level) Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 6: Product Layout

    ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 4.0 PRODUCT LAYOUT Components on Shield­PS2 and their functions: 1. Stackable Analog Input Header This is the analog port of the Arduino. The stackable header allows other stacked shield to                               utilize these pins. 2. Stackable Power Pins Header This is the power port of the Arduino.
  • Page 7 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Arduino main board will require around 30ms to ready after reset. 4. Status indicator LED (Orange) This LED will blink and illuminate with different brightness depending on the PS2 status. LED Condition Description Blink with different Once power up, if there is no SONY PS2 controller connected or                       brightness detected.. Stay illuminated with SONY PS2 controller detected and communication is working fine. low brightness Stay illuminated with Digital button on SONY PS2 controller is pressed. high brightness 5.
  • Page 8: Hardware Interface

    ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 5.0 HARDWARE INTERFACE This section shows the example of using SHIELD­PS2 with Arduino UNO as the main controller.                             However, other Arduino main board such as Arduino Duemilanove and Arduino Mega can also be  ...
  • Page 9 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 USB cable to Arduino main board and load example code. Sample source code and Arduino’s                             Library can be downloaded from the SHIELD­PS2 product page at Cytron’s website. Connect the PS2 joystick to the PS2 connector socket on SHIELD­PS2 as shown. Don’t forget  ...
  • Page 10 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 11                               use original PS2 controller. Cytron Technologies does not guarantee compatibility for all PS2                        ...
  • Page 12                           Technologies website. It is advised to use PS2 controller from Cytron Technologies because                         PS2 controller is tested before it is being shipped to customer. Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 13 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Analog output format 1: There are 2 variables for each joystick, axis X and axis Y, this is what we commonly use in graph                                  ...
  • Page 14 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Analog output format 2: In format 2, there are four variables for each joystick. The four variables are up, down, left and                                   right. When user move the joystick in any direction, the value of these four variables change from 0  ...
  • Page 15 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 l ­ mean Left joystick x ­ mean X axis, format 1, range 0 to 255 r ­ mean Right joystick y ­ mean Y axis, format 1, range 0 to 255 u ­ mean Up axis, format 2, range 0 to 100 d ­ mean Down axis, format 2, range 0 to 100 l ­ mean Left axis, format 2, range 0 to 100 r ­ mean Right axis, format 2, range 0 to 100 Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 16 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 6. PROTOCOL By default, Shield­PS2 is in passive condition, where it waits for command from UART. If Arduino                               main board sends a command, it will response based on the command and the status of PS2 button  ...
  • Page 17 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Applied to value from 16 to 27 (decimal): left joystick down value Shield­PS2 will return the particular value of corresponding joystick in the selected axis left joystick left value Example : left joystick right value If main board sent 20 (decimal), Shield­PS2 will read and return the value of left joystick up. right joystick up value right joystick down value right joystick left value right joystick right value Return the connection status Shield­PS2 will read PS2 controller status of PS2 controller on 1 is return if controller is detected or connected to Shield­PS2 the PS2 connector on Shield­PS2 6.2 On board Vibrator Motor Control Following commands require two bytes of data send from main board. 1st byte to indicates which    ...
  • Page 18 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 6.3 All PS2 Button and Joystick Status Send (decimal) Response from PS2 Description Shield­PS2 will return the status of all digital and analog joystick of PS2 Digital group 1: bit 7 (MSB): Left button bit 6: Down button bit 5: Right button bit 4: Up button bit 3: Start button bit 2: Right Joystick Center button bit 1: Left Joystick Center button bit 0 (LSB): Select button 6 bytes of data: Digital group 2: 1st byte: digital button group 1 bit 7 (MSB): Square button 2nd byte: digital button group 2 bit 6: Cross button 3rd byte: Right Joystick X axis bit 5: Circle button 4th byte: Right Joystick Y axis bit 4: Triangle button 5th byte: Left Joystick X axis bit 3: R1 button 6th byte: Left Joystick Y axis bit 2: L1 button bit 1: R2  button bit 0 (LSB): L2 button 0 if the button is pressed 1 if button is not pressed Example: If microcontroller sent 31 (decimal), Shield­PS2 will check all the button and joystick status and return 6 bytes to microcontroller.
  • Page 19 ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 Examples: Example of UART communication shows main board obtain the Circle button of PS2 Example of UART communication shows mainboard obtain the Left jostick, X axis value of PS2 Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
  • Page 20: Warranty

    ROBOT . HEAD to TOE                                                                      Product User’s Manual – Shield­PS2 7.0 WARRANTY ● Product warranty is valid for 12 months. ● Warranty only applies to manufacturing defect. ● Damaged caused by misuse is not covered under warranty ● Warranty does not cover freight cost for both ways. Prepared by Cytron Technologies Sdn. Bhd. 19, Jalan Kebudayaan 1A, Taman Universiti, 81300 Skudai, Johor, Malaysia. Tel: +607­521 3178 Fax: +607­521 1861 URL: www.cytron.com.my Email: support@cytron.com.my sales@cytron.com.my Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...

Table of Contents