Keyestudio 4DOF Manual page 198

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

Advertisement

www.keyestudio.com
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);
myservo4.attach(9);
if(error != 0)
return;
ps2x.read_gamepad(false, vibrate);
large motor to spin at 'vibrate' speed
if(ps2x.Button(PSB_START))
button is pressed
Serial.println("Start is being held");
if(ps2x.Button(PSB_SELECT))
Serial.println("Select is being held");
// set the control pin of servo 3 to D6
// set the control pin of servo 4 to D9
//read controller and set
//will be TRUE as long as
195

Advertisement

Table of Contents
loading

Table of Contents