An Arduino based control sofware for EEZYBotArm MK2. Ready to use, just download it send command via serial monitor(Arduino IDE).
Join servos' signal cables(yellow cables) 8 and 9, 10 pins.
- Click green button named "Clone or download"
- Click "Download ZIP"
- Double click to downloaded Zip file(name is "arduino_EEZYbotARM_MK2_control_code-master.zip") and open it
- Double click to "arduino_code.ino", Arduino ide will show up
- click Upload button of Arduino ide and send codes to arduino
Now, you are ready!
Open the serial monitor, Set bounds rate to 9600 You can send one of two type of commands;
140,160,120
Sets the tree servos angles you give; 140 and 160, 120.
1 40
Sets 1. servo to 40 degrees. You can use that command for 2. and 3. servos, too.
-
Connect potans to 13 and 14, 15 pins.
-
Change code a bit; Comment out that line;
//readPotans();
Should look like that;
readPotans();
Comment these lines;
while (Serial.available() > 0) {
String cmd = Serial.readString();
char fchar = cmd.charAt(1);
String number = "no";
if ( fchar == ' ' ) {
number = "yes";
//Serial.println( "number sended." );
int servoNumber = getValue( cmd , ' ' , 0).toInt();
int degree = getValue( cmd , ' ' , 1).toInt();
axisMove( servoNumber, degree );
} else {
String pos1str = getValue( cmd , ',' , 0);
String pos2str = getValue( cmd , ',' , 1);
String pos3str = getValue( cmd , ',' , 2);
int pos1 = pos1str.toInt();
int pos2 = pos2str.toInt();
int pos3 = pos3str.toInt();
axisMove( pos1 , pos2 , pos3 );
//Serial.println( " komut : " + pos1str + " ," + pos2str + " ," + pos3str ); // 139,120,55
}
}
Should look like these;
/*
while (Serial.available() > 0) {
String cmd = Serial.readString();
char fchar = cmd.charAt(1);
String number = "no";
if ( fchar == ' ' ) {
number = "yes";
//Serial.println( "number sended." );
int servoNumber = getValue( cmd , ' ' , 0).toInt();
int degree = getValue( cmd , ' ' , 1).toInt();
axisMove( servoNumber, degree );
} else {
String pos1str = getValue( cmd , ',' , 0);
String pos2str = getValue( cmd , ',' , 1);
String pos3str = getValue( cmd , ',' , 2);
int pos1 = pos1str.toInt();
int pos2 = pos2str.toInt();
int pos3 = pos3str.toInt();
axisMove( pos1 , pos2 , pos3 );
//Serial.println( " komut : " + pos1str + " ," + pos2str + " ," + pos3str ); // 139,120,55
}
}
*/
And you ready! Just rotate the potans and see the magic!