Keyestudio 4DOF Manual page 175

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

Advertisement

www.keyestudio.com
void setup()
{
// boot posture
myservo1.write(pos1);
delay(1000);
myservo2.write(pos2);
myservo3.write(pos3);
myservo4.write(pos4);
delay(1500);
Serial.begin(9600); // set the baud rate to 9600
}
void loop()
{
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(Serial.available())
{
// set the control pin of servo 3 to D6
// set the control pin of servo 4 to D9
// if receive the data
172

Advertisement

Table of Contents
loading

Table of Contents