Project showcase
Arduino LEG

Arduino LEG © CERN-OHL

I built a leg with Arduino and with ice cream sticks!

  • 1,273 views
  • 0 comments
  • 3 respects

Components and supplies

About this project

Hi,

I beginning by saying that this project goes back about a year ago, and now that I've found the first test videos I decided to share this project on Arduino Hub.

I realized the project with 4 servo and many ice cream sticks, and I think its result is similar to a real leg, when I realized it was the first weapon with Arduino so the only movement it can do is to move all the servomotors At the same time, creating a general movement of each part. Below I put a video of her movement:

The structure bump is due to problems with the servomotors

Here is also the photo of the structure being tested (Sorry but it is overturned):

There are no explanations on how to build it, because it goes back a year ago and the files are lost, sorry, but below incorporate the code of its operation, thank you for reading this post.

Code

The CodeC/C++
#include <Servo.h>

Servo S1;
Servo S2;
Servo S3;
Servo S4;

int baud = 9600;
int ledpin = 7;

void setup() {
 Serial.begin(baud);

 S1.attach(3);
 S2.attach(5);
 S3.attach(6);
 S4.attach(9);

 pinMode(ledpin, OUTPUT);

     for (int pos = 0; pos <= 30; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    S1.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (int pos = 30; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
   S1.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }              
  for (int pos = 0; pos <= 30; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    S2.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (int pos = 30; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
   S2.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }              
  for (int pos = 0; pos <= 30; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    S3.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (int pos = 30; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
   S3.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }              
  for (int pos = 0; pos <= 30; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    S4.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (int pos = 30; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
   S4.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }  
}

void loop() {

    //in this code the movments are looped for 1 time
}

Comments

Similar projects you might like

3D-Printed Controllable Hand

Project showcase by Elliot Hicks and Conner Caruso

  • 2,423 views
  • 0 comments
  • 16 respects

Where's my stuff?? - Find your misplaced things with Alexa!

Project in progress by Team Crakers

  • 1,630 views
  • 0 comments
  • 6 respects

Animatronic Hand

Project showcase by Team Nuts and Bolts

  • 1,152 views
  • 0 comments
  • 4 respects

Simple Programmable Robotic Arm

Project showcase by Ryan Chan

  • 49,245 views
  • 63 comments
  • 145 respects

Wifi Death Lamp

Project showcase by Jhn S

  • 29,036 views
  • 3 comments
  • 82 respects

Bluetooth Controlled Light Switch

Project showcase by Team The Instrumentation Crustaceans

  • 23,437 views
  • 4 comments
  • 26 respects
Add projectSign up / Login