Bismillah Insha allah
all the cost should not exceed 1.5k
ground build
no 3d printing better
---
4 axis robot arm
https://www.electronicshub.org/robotic-arm/
---
/*NOTE: Four Servos of the Robotic Arm are connected to 4 PWM Pins of Arduino
and these 4 servos are named a, b, c and d.
If you want to control servo a, then type "90a/",
where "90" is the PWM value (range is 0 - 255),
"a" means servo a and "/" is string parse delimiter.
Some other examples: 100a/ or 120b/ or 40c/ or 25d/
*/
String readString;
int x=90, y=90, z=90, p=90;
#include
Servo myservoa, myservob, myservoc, myservod;
void setup()
{
Serial.begin(9600);
myservoa.attach(3);
myservob.attach(5);
myservoc.attach(6);
myservod.attach(9);
myservoa.write(x);
myservob.write(y);
myservoc.write(z);
myservod.write(p);
}
void loop()
{
if (Serial.available())
{
char m = Serial.read();
if (m == '/')
{
if (readString.length() >1)
{
Serial.println(readString);
int temp = readString.toInt();
Serial.print("writing Angle: ");
Serial.println(temp);
if(readString.indexOf('a') >=0)
{
if (temp>x)
{
for (int i=x; i {
myservoa.write(i);
delay(10);
}
x=temp;
}
else
{
for (int i=x; i>temp; i--)
{
myservoa.write(i);
delay(30);
}
}
x=temp;
}
//////////////////////////////////////////////////////////////////////////////
if(readString.indexOf('b') >=0)
{
if (temp>y)
{
for (int i=y; i { myservob.write(i);
delay(10);
}
y=temp;
}
else
{
for (int i=y; i>temp; i--)
{
myservob.write(i);
delay(10);
}
y=temp;
}
}
///////////////////////////////////////////////////////////////////////
if(readString.indexOf('c') >=0) //myservoc.write(n);
{
if (temp>z)
{
for (int i=z; i {myservoc.write(i);
delay(10);}
z=temp;
}
else
{
for (int i=z; i>temp; i--)
{
myservoc.write(i);
delay(10);
}
z=temp;
}
}
/////////////////////////////////////////////////////
if(readString.indexOf('d') >=0)
{
if (temp>p)
{
for (int i=p; i {
myservod.write(i);
delay(10);
}
p=temp;
}
else
{
for (int i=p; i>temp; i--)
{
myservod.write(i);
delay(30);
}
}
p=temp;
}
readString="";
}
}
else
{
readString += m;
}
}
}
---
buy cheap robot arm
https://www.banggood.com/search/robot-arm.html?utm_source=google&utm_medium=cpc_ods&utm_campaign=fish-sds-fish&utm_content=nancy&gclid=Cj0KCQiAgMPgBRDDARIsAOh3uyKIDhOeh12IuhqtWwytg7QzoTHr2SfVapFXlmwZD47iE8Y70XF-9QQaAul7EALw_wcB
https://www.banggood.com/4DOF-Assembling-Acrylic-Mechine-Robot-Arm-with-SG90-Plastic-Gear-Servo-For-Robot-DIY-p-1185185.html?rmmds=search&cur_warehouse=CN
4DOF Assembling Acrylic Mechine Robot Arm with SG90 Plastic Gear Servo For Robot DIY
---
Tower PRo TM
Micro Servo
9g
SG90
all the cost should not exceed 1.5k
ground build
no 3d printing better
---
4 axis robot arm
https://www.electronicshub.org/robotic-arm/
---
/*NOTE: Four Servos of the Robotic Arm are connected to 4 PWM Pins of Arduino
and these 4 servos are named a, b, c and d.
If you want to control servo a, then type "90a/",
where "90" is the PWM value (range is 0 - 255),
"a" means servo a and "/" is string parse delimiter.
Some other examples: 100a/ or 120b/ or 40c/ or 25d/
*/
String readString;
int x=90, y=90, z=90, p=90;
#include
Servo myservoa, myservob, myservoc, myservod;
void setup()
{
Serial.begin(9600);
myservoa.attach(3);
myservob.attach(5);
myservoc.attach(6);
myservod.attach(9);
myservoa.write(x);
myservob.write(y);
myservoc.write(z);
myservod.write(p);
}
void loop()
{
if (Serial.available())
{
char m = Serial.read();
if (m == '/')
{
if (readString.length() >1)
{
Serial.println(readString);
int temp = readString.toInt();
Serial.print("writing Angle: ");
Serial.println(temp);
if(readString.indexOf('a') >=0)
{
if (temp>x)
{
for (int i=x; i
myservoa.write(i);
delay(10);
}
x=temp;
}
else
{
for (int i=x; i>temp; i--)
{
myservoa.write(i);
delay(30);
}
}
x=temp;
}
//////////////////////////////////////////////////////////////////////////////
if(readString.indexOf('b') >=0)
{
if (temp>y)
{
for (int i=y; i
delay(10);
}
y=temp;
}
else
{
for (int i=y; i>temp; i--)
{
myservob.write(i);
delay(10);
}
y=temp;
}
}
///////////////////////////////////////////////////////////////////////
if(readString.indexOf('c') >=0) //myservoc.write(n);
{
if (temp>z)
{
for (int i=z; i
delay(10);}
z=temp;
}
else
{
for (int i=z; i>temp; i--)
{
myservoc.write(i);
delay(10);
}
z=temp;
}
}
/////////////////////////////////////////////////////
if(readString.indexOf('d') >=0)
{
if (temp>p)
{
for (int i=p; i
myservod.write(i);
delay(10);
}
p=temp;
}
else
{
for (int i=p; i>temp; i--)
{
myservod.write(i);
delay(30);
}
}
p=temp;
}
readString="";
}
}
else
{
readString += m;
}
}
}
---
buy cheap robot arm
https://www.banggood.com/search/robot-arm.html?utm_source=google&utm_medium=cpc_ods&utm_campaign=fish-sds-fish&utm_content=nancy&gclid=Cj0KCQiAgMPgBRDDARIsAOh3uyKIDhOeh12IuhqtWwytg7QzoTHr2SfVapFXlmwZD47iE8Y70XF-9QQaAul7EALw_wcB
https://www.banggood.com/4DOF-Assembling-Acrylic-Mechine-Robot-Arm-with-SG90-Plastic-Gear-Servo-For-Robot-DIY-p-1185185.html?rmmds=search&cur_warehouse=CN
4DOF Assembling Acrylic Mechine Robot Arm with SG90 Plastic Gear Servo For Robot DIY
---
Tower PRo TM
Micro Servo
9g
SG90
No comments:
Post a Comment