Keyestudio 4DOF Manual page 134

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

Advertisement

www.keyestudio.com
x2 = analogRead(left_X); // read the left X value
y2 = analogRead(left_Y); // read the left Y value
z2 = digitalRead(left_key); // read the left Z value
//delay(5); // reduce the speed overall
if(z1==1)
// if the right joystick key is pressed
{
delay(10);
// delay for eliminating shake
if(z1==1)
// judge again if the right key is pressed
{
s1=myservo1.read();
delay(100);
Serial.println(s1);
s2=myservo2.read();
delay(100);
Serial.println(s2);
s3=myservo3.read();
delay(100);
Serial.println(s3);
s4=myservo4.read();
delay(100);
Serial.println(s4);
// read the angle value of each servo
131

Advertisement

Table of Contents
loading

Table of Contents