RoboArm With 1Sheeld Gamepad

RoboArm With 1Sheeld Gamepad © CC BY

My project is a pocket sized robot arm you can control it by your smartphone.

  • 2,481 views
  • 0 comments
  • 9 respects

Components and supplies

Apps and online services

About this project

Step 1: Gather your parts!

The RoboArm was designed with economy in mind. It is understood that laser cutters aren't the most common tools but there are more of them out there now than ever! First you'll need a set of parts. Grab the dxf and use a cnc mill or laser cutter.

Next you'll need all of the screws and nuts. We use M3 (metric 3mm) standard parts. The number of these to build the latest version is:

Nut x 10

6mm x 9

8mm x 12

10mm x 3

12mm x 7

20mm x 4

Washers x 0 (we removed these as nobody ever used them!!)

You could no doubt find imperial sized counterparts, as a nation you managed to get a man to the moon with foot pounds per square inch so I'll leave the conversions in your capable hands (in case of residents of Liberia or Myamar ignore the bit about the moon).

You'll also need 4 hobby servos. We tend to use the 9g resin gear ones. The metal gear ones with the same footprint are better but they're more expensive.



















Adruino With 1sheeld

5. And lastly connect USB to laptop!

Software

1. Download and install arduino IDE:

https://www.arduino.cc/en/Main/Software

Installation instructions:

https://www.arduino.cc/en/Guide/HomePage

2. Download and install 1Sheeld library: http://1sheeld.com/downloads/

*note: follow guide for library installation in arduino tutorial linked above

3. Launch the arduino IDE and check the connection to uno board is established.

4. Paste Arm Code in the IDE.

5. Upload code to board by clicking arrow button.

don't forget to switch the 1sheeld to switch mode (unplugged wire icon) before uploading code

6. Switch the 1sheeld back to UART mode.

7. Download and install 1sheeld app to your smart device:


Code

Untitled fileArduino
/*
	This code is for controlling MeArm using 1Sheeld gamepad shield
	The Robot is 4 servo motors 
	Used arduino uno and 1sheeld

*/

// Defining the shield needed only (gamepad), this will save memory
#define CUSTOM_SETTINGS
#define INCLUDE_GAMEPAD_SHIELD

// Include OneSheeld.h and Servo.h for controlling servo's
#include <OneSheeld.h>
#include <Servo.h>

// Making servo objects
Servo base;
Servo shoulder;
Servo elbow;
Servo hand;

// Global varianles for initializing the servo motors positions
int basePos=90;
int shoulderPos=60;
int elbowPos=90;
int handPos=90;

// Setup code runs only one time
void setup()
{
	// Begging the onesheeld
	OneSheeld.begin();
	
	// Attach servo motors
	// Base on 8, shoulder on 9, elbow on 10 and hand on 11
	base.attach(6);
	shoulder.attach(9);
	elbow.attach(10);
	hand.attach(11);
}

// Loop code runs reaptrepeatedly
void loop()
{
	// Controlling base
	// Right moves the base to right and left moves it to left
	if(GamePad.isRightPressed()) {
		basePos-=8;
	} else if(GamePad.isLeftPressed()) {
		basePos+=8;
	}
	// Controlling elbow
	// Up moves the elbow up and down gets it down
	if(GamePad.isUpPressed()) {
		elbowPos+=8;
	} else if(GamePad.isDownPressed()) {
		elbowPos-=8;
	}
	// Controlling shoulder
	// Orange button moves it forward and green moves it backward
	if(GamePad.isOrangePressed()) {
		shoulderPos+=8;
	} else if(GamePad.isGreenPressed()) {
		shoulderPos-=8;
	}
	// Controlling hand
	// Red closes the hand and blue opens it
	if(GamePad.isRedPressed()) {
		handPos+=8;
	} else if(GamePad.isBluePressed()) {
		handPos-=8;
	}
	
	// Move the servo motors to it's new positions
	base.write(basePos);
	shoulder.write(shoulderPos);
	elbow.write(elbowPos);
	hand.write(handPos);
	
	// Delay before run again
	delay(60);
}
Roboarm Gamepad 1sheeld

Custom parts and enclosures

parts (dxf)
V1.0Sharing.dxf

Schematics

Servo Motor Arduino Wiring Schematics and Source Code
Mearm uno servo 1%20copy%20copy

Comments

Similar projects you might like

Super Easy to Build 1Sheeld 2 Wheel Drive Robot

Project tutorial by Garry Gerwer and Ahmed Hamdy

  • 17,138 views
  • 3 comments
  • 34 respects

Control your RoboArm with your Smartphone

Project in progress by Team Zone Team

  • 9,808 views
  • 7 comments
  • 27 respects

Universal Remote Control using Arduino, 1Sheeld and Android

Project tutorial by Ashraf Nabil

  • 8,429 views
  • 5 comments
  • 13 respects

Arduino can hear and understand your voice with 1Sheeld !

Project tutorial by Alessandro Didonna

  • 2,963 views
  • 1 comment
  • 10 respects

Line Follower Robot Using Arduino & 1Sheeld

Project tutorial by Ashraf Nabil

  • 2,443 views
  • 0 comments
  • 6 respects
Add projectSign up / Login