Dancing Spider
![Video](/proxy/?url=https://content.instructables.com/FWA/ZWOR/J9OWFQ12/FWAZWORJ9OWFQ12.jpg&filename=Video)
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?!?!
Parts You Will Need
![image2.jpeg](/proxy/?url=https://content.instructables.com/F8O/EORO/J9OWFPPE/F8OEOROJ9OWFPPE.jpg&filename=image2.jpeg)
![image3.jpeg](/proxy/?url=https://content.instructables.com/FJY/ZTYJ/J9OWFPQQ/FJYZTYJJ9OWFPQQ.jpg&filename=image3.jpeg)
![image1-2.jpeg](/proxy/?url=https://content.instructables.com/FKC/EROW/J9OWFPS2/FKCEROWJ9OWFPS2.jpg&filename=image1-2.jpeg)
![image1.jpeg](/proxy/?url=https://content.instructables.com/F80/7BKR/J9OWFPTG/F807BKRJ9OWFPTG.jpg&filename=image1.jpeg)
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
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 }