Keyestudio 4DOF Manual page 132

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

Advertisement

www.keyestudio.com
const int right_Y = A5; // define the right Y pin to A5
const int right_key = 7; // define the right key pin to 7(that is Z value)
const int left_X = A3; // define the left X pin to A3
const int left_Y = A4; // define the left Y pin to A4
const int left_key = 8; // define the left key pin to 8(that is Z value)
int x1,y1,z1; //define the variable, used to save the joystick value.
int x2,y2,z2;
int s1,s2,s3,s4;
int jiyi1[10]; // define 4 array, separately used to save the angle of four servo.
int jiyi2[10]; //(array length is 10,namely can save angle data of 0~10 servo )
int jiyi3[10]; // if need to save more data, just change the number 10 to be more larger number.
int jiyi4[10];
int i=0; // for loop
int j=0; // save the last value of i
void setup()
{
// boot posture
myservo1.write(pos1);
delay(1000);
129

Advertisement

Table of Contents
loading

Table of Contents