180
www.keyestudio.com
On the drive shield there is a PS2 Joystick connector, which is easy for you
to control the 4DOF robot arm using the PS2 Joypad. But you need to
purchase it by yourself because the PS2 Joypad is not included in the kit.
When use the PS2 Joypad to control the robot arm, first need to get the
corresponding character of each key on the PS2 Joypad.
So this experiment will help you test the character of each key on the PS2
Joypad.
After connecting the Joypad, should upload the test program on Arduino
IDE. But before testing, should place the
PS2X_lib
folder inside the libraries
folder of Arduino IDE directory.
Uploading the code, open the serial monitor, connect the PS2 Joypad.
When press down the key, you should see the corresponding character on
the monitor.
Test Code 10:
#include <PS2X_lib.h> //for v1.6
PS2X ps2x; // create PS2 Controller Class
//right now, the library does NOT support hot pluggable controllers, meaning
//you must always either restart your Arduino after you conect the controller,
//or call config_gamepad(pins) again after connecting the controller.
Summary of Contents for 4DOF
Page 1: ...Keyestudio 4DOF Robot Arm Kit for Arduino DIY...
Page 12: ...9 4 Assembly Guide 1 Install the base of the robotic arm Components Needed...
Page 13: ...10...
Page 14: ...11...
Page 15: ...12...
Page 16: ...13 The base is installed successfully...
Page 17: ...14 2 Mount servos onto the base Components Needed...
Page 18: ...15...
Page 19: ...16 Assemble a servo left onto the left board...
Page 20: ...17 Components Needed...
Page 23: ...20...
Page 24: ...21 a Fix the arm...
Page 25: ...22...
Page 26: ...23 Mount a servo right onto the right board Components Needed...
Page 27: ...24 Note the breach direction of acrylic board...
Page 30: ...27...
Page 31: ...28...
Page 32: ...29 Install the holder part...
Page 33: ...30 Fix the left part and the mount part together...
Page 34: ...31...
Page 35: ...32 Fix the right part and the ABS holder together...
Page 36: ...33 Note the direction of the ABS holder...
Page 37: ...34...
Page 38: ...35...
Page 39: ...36...
Page 40: ...37 Install the middle part...
Page 41: ...38...
Page 42: ...39...
Page 43: ...40...
Page 44: ...41...
Page 45: ...42...
Page 46: ...43...
Page 47: ...44 Assemble the claw...
Page 48: ...45...
Page 49: ...46...
Page 50: ...47...
Page 51: ...48...
Page 55: ...52...
Page 56: ...53 Components Needed...
Page 57: ...54...
Page 61: ...58...
Page 62: ...59 Mount the control part...
Page 63: ...60...
Page 64: ...61 Wiring up Guide...
Page 65: ...62...
Page 66: ...63...
Page 67: ...64...
Page 68: ...65...
Page 79: ...76 Click OK to enter the following page Click browse my computer for updated driver software...
Page 82: ...79 3 Arduino IDE Setting...
Page 85: ...82...
Page 88: ...85 Project 2 4DOF Rotation and Pin Control 1 Joint Rotation and Servo Angle Settings...
Page 102: ...99 set the baud rate to 9600 you should see the analog value of the right Joystick pin X Y...
Page 105: ...102 www keyestudio com...
Page 147: ...144 www keyestudio com...
Page 168: ...165 www keyestudio com Test Code void setup Serial begin 9600 set the serial baud rate to 9600...
Page 173: ...170 www keyestudio com...