EasyManua.ls Logo

Keyestudio 4DOF - Page 268

Keyestudio 4DOF
276 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
265
// delay(5);
if(pos1<1) // limit the right turning angle
{
pos1=1;
}
}
// turn left
if(ps2x.Analog (PSS_RX) < 50) // if push the right joystick to the left
{
//Serial.println(ps2x.Analog(PSS_RX), DEC);
pos1=pos1+1; //pos1 plus 1
myservo1.write(pos1); // the robot arm turns left
// delay(5);
if(pos1>180) // limit the left turning angle
{
pos1=180;
}
}
}
//**********************************************************************
// the upper arm
void xiaobi()
{
// upper arm front
if(ps2x.Analog(PSS_RY)<50) // if push the right joystick upward
{

Related product manuals