Keyestudio 4DOF Manual page 229

Robot mechanical arm kit for arduino diy
Hide thumbs Also See for 4DOF:
Table of Contents

Advertisement

//Serial.print(ps2x.Analog(1), HEX);
ps2x.enableRumble();
ps2x.enablePressures();
}
void loop(){
/* You must Read Gamepad to get new values
Read GamePad and set vibration values
ps2x.read_gamepad(small motor on/off, larger motor strenght from 0-255)
if you don't enable the rumble, use ps2x.read_gamepad(); with no values
you should call this at least once a second
*/
myservo1.attach(A1); // set the control pin of servo 1 to A1
myservo2.attach(A0); // set the control pin of servo 2 to A0
myservo3.attach(6);
// set the control pin of servo 3 to D6
myservo4.attach(9);
// set the control pin of servo 4 to D9
if(error != 0)
return;
//enable rumble vibration motors
//enable reading the pressure values from the buttons.
226

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents