Massimiliano
Published © MIT

Arduino Robot Arm Follow Your Movement with Tactigon

We wanted to use The Tactigon ONE and T-Skin to move a Arduino One base robot arm and have it follow our movements. Rasberry is central unit

AdvancedFull instructions providedOver 6 days748

Things used in this project

Hardware components

The Tactigon One
The Tactigon One
×2
The Tactigon Skin (T-SKIN)
The Tactigon Skin (T-SKIN)
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
ARDUINO UNO REV3 CON ATMEGA328
×1
Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1
Arduino MotorShield Rev3
Arduino MotorShield Rev3
SHIELD ARDUINO CONTROLLO SERVO RC
×1
Bluetooth Low Energy (BLE) Module (Generic)
The Arduino UNO, on its side, does not have Bluetooth Low Energy communication, so we used an HC-05 module for this purpose.
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Robot Arm

Arduino
#include <Braccio.h>
#include <Servo.h>



#define pump  2
#define valve 4


Servo base;
Servo shoulder;
Servo elbow;
Servo wrist_rot;
Servo wrist_ver;
Servo gripper;



// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(pump, OUTPUT);
  pinMode(valve, OUTPUT);

  digitalWrite(pump, HIGH);
  digitalWrite(valve, HIGH); //HIGH SUCCHIO  LOW RILASCIO

  //For each step motor this set up the initial degree


  Braccio.begin();
}

void loop() {
  //vado in posizione A
  Braccio.ServoMovement(40, 120, 110, 90, 100, 90, 90); 
  Braccio.ServoMovement(40, 120, 60, 90, 100, 90, 90);
  delay(500);
  Braccio.ServoMovement(40, 120, 60, 90, 100, 90, 90);
  Braccio.ServoMovement(40, 120, 60, 100, 100, 90, 90);
  //mi abbasso e dico no no  
  Braccio.ServoMovement(10, 120, 60, 100, 50, 90, 90);      //no no
  Braccio.ServoMovement(10, 120, 60, 100, 150, 90, 90); 
  Braccio.ServoMovement(10, 120, 60, 100, 50, 90, 90); 
  Braccio.ServoMovement(10, 120, 60, 100, 90, 90, 90);   
  delay(1000);
  // vado in posizione B e mi abbasso
  Braccio.ServoMovement(40, 120, 110, 90, 100, 90, 90); 
  Braccio.ServoMovement(40, 70, 60, 90, 90, 90, 90);  
  Braccio.ServoMovement(40, 70, 60, 110, 90, 90, 90); 
  //faccio partire la pompa
  digitalWrite(valve, HIGH);
  digitalWrite(pump, LOW);
  delay(1000);
  //mi alzo
  Braccio.ServoMovement(40, 70, 60, 90, 90, 90, 90);  
  Braccio.ServoMovement(40, 70, 110, 90, 90, 90, 90); 
  Braccio.ServoMovement(40, 70, 110, 90, 50, 90, 90);

  //Vado in posizione A  
  delay(1000);
  Braccio.ServoMovement(40, 120, 110, 90, 100, 90, 90); 
  Braccio.ServoMovement(40, 120, 60, 90, 100, 90, 90);
  delay(500);
  // mi abbasso
  Braccio.ServoMovement(40, 120, 60, 110, 100, 90, 90);
  //spengo la pompa 
  digitalWrite(valve, LOW);
  digitalWrite(pump, HIGH);
  delay(1000);
  //mi alzo
  Braccio.ServoMovement(40, 120, 90, 90, 100, 90, 90);
  Braccio.ServoMovement(40, 120, 90, 90, 90, 90, 90);

  //Vado in posizione B
  delay(1000);
  Braccio.ServoMovement(40, 70, 60, 80, 90, 90, 90);  
  Braccio.ServoMovement(40, 70, 60, 100, 90, 90, 90); 
  //Mi abbasso
  delay(1000);
  //e dico no no
  Braccio.ServoMovement(10, 70, 60, 100, 50, 90, 90);   //no no
  Braccio.ServoMovement(10, 70, 60, 100, 150, 90, 90);
  Braccio.ServoMovement(10, 70, 60, 100, 50, 90, 90);
  Braccio.ServoMovement(10, 70, 60, 100, 90, 90, 90);
  //Wait 1 second
  delay(1000);
  //mi rialzo e vado in posizione A
  Braccio.ServoMovement(40, 120, 110, 90, 100, 90, 90); 
  Braccio.ServoMovement(40, 120, 60, 90, 100, 90, 90);
  delay(500);
  //mi abbasso
  Braccio.ServoMovement(40, 120, 60, 90, 100, 90, 90);
  Braccio.ServoMovement(40, 120, 60, 110, 100, 90, 90);
  //e faccio partire la pompa
  digitalWrite(valve, HIGH);
  digitalWrite(pump, LOW);
  delay(1000);
  //mi alzo
  Braccio.ServoMovement(40, 120, 90, 90, 100, 90, 90);
  Braccio.ServoMovement(40, 120, 90, 90, 90, 90, 90);
  

  //Wait 1 second
  delay(1000);
  //vado in pos B
  Braccio.ServoMovement(40, 70, 60, 90, 90, 90, 90);  
  Braccio.ServoMovement(40, 70, 60, 110, 90, 90, 90); 
  digitalWrite(valve, LOW);
  digitalWrite(pump, HIGH);
  //dico no no
  delay(1000);
  Braccio.ServoMovement(40, 70, 60, 90, 90, 90, 90);  
  Braccio.ServoMovement(40, 70, 110, 90, 90, 90, 90); 
  Braccio.ServoMovement(40, 70, 110, 90, 50, 90, 90);
  //Wait 1 second

}

Credits

Massimiliano

Massimiliano

20 projects • 82 followers
I'm an engineer and I like robotics, embedded systems and linux. I spent a lot of time in automation and firmware development.

Comments