Dancing Spider

This project is a great project and simple to make. This can make Halloween a lot better. Who doesn't want a dancing spider in their house?!?!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts You Will Need

1. Two servo motors

2. Some male wires

3. Breadboard

4. Ultra Sonic Distance sensor (not to use for its purpose just for it to look like eyes)

5. Arduino Uno

Step 2: Code You Will Need

#include

Servo myservo1; Servo myservo2; // create servo object to control a servo // create servo object to control a servo // twelve servo objects can be created on most boards

void setup() { myservo1.attach(9); // attaches the servo on pin 9 to the servo object

myservo2.attach(10); }

int pos = 0; // variable to store the servo position void loop() { for (pos = 0; pos <= 180; pos += 10) { // goes from 0 degrees to 180 degrees // in steps of 1 degree myservo1.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position

} for (pos = 0; pos >= 180; pos -= 1) { // goes from 180 degrees to 0 degrees myservo2.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position }

int pos = 0; // variable to store the servo position for (pos = 180; pos <= 0; pos += 1) { // goes from 0 degrees to 180 degrees // in steps of 1 degree myservo1.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position

} for (pos = 180; pos >= 0; pos -= 10) { // goes from 180 degrees to 0 degrees myservo2.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position }

Make It Move Contest 2017

Participated in the
Make It Move Contest 2017

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    2 Discussions

    0
    None
    tliguori330

    1 year ago

    Really cool, thanks for the ideas. I can see this going a lot of different ways

    0
    None
    Swansong

    1 year ago

    That's a fun setup :) Are you going to make a shell or casing to make it a spider?