Keyestudio 4DOF Manual page 138

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

Advertisement

Test Code 2:
*******************************************************************************************************************************
#include <Servo.h>
Servo myservo1; // create servo object to control a servo
Servo myservo2;
Servo myservo3;
Servo myservo4;
int pos1=80, pos2=60, pos3=130, pos4=0;
void setup()
{
myservo1.attach(A1); // attaches the servo on pin 9 to the servo object
myservo2.attach(A0);
myservo3.attach(6);
myservo4.attach(9);
myservo1.write(pos1);
delay(1000);
myservo2.write(pos2);
myservo3.write(pos3);
myservo4.write(pos4);
delay(1500);
}
135

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents