Jeremie
Published © GPL3+

Ugly Bug

A walking insect looking thing made from leftovers.

BeginnerFull instructions provided1 hour19,824
Ugly Bug

Things used in this project

Hardware components

Arduino Pro Mini 328 - 3.3V/8MHz
SparkFun Arduino Pro Mini 328 - 3.3V/8MHz
×1
Servos (Tower Pro MG996R)
×1
Slide Switch
Slide Switch
×1
Cable Ties (10 Pack)
OpenBuilds Cable Ties (10 Pack)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Li-Ion Battery 1000mAh
Li-Ion Battery 1000mAh
×1
Ping Pong Ball
×1
Steel Wire
×1
Glue stick
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Bug

Code

Bug

Arduino
#include <Servo.h>
int FRONT = 4;
int BACK = 5;

Servo frontLegs, backLegs;

void setup() {
  pinMode(13, OUTPUT);  //This is just for the pretty blinking
  frontLegs.attach(FRONT); 
  backLegs.attach(BACK);
  frontLegs.write(90);  //Center the servo
  backLegs.write(90);   //Center the servo
  delay(5000);          //Wait 5 sec (This gives us time to unplug the arduino
                        //  so we can affix the legs.
}


void loop() {
  digitalWrite(13,HIGH);      //LED on
  delay(200);
  frontLegs.write(70);        //move front leg a little
  delay(200);
  backLegs.write(70);         //move back leg a little
  digitalWrite(13,LOW);       //LED off
  delay(200);
  frontLegs.write(110);       //move front leg a little
  delay(200);
  backLegs.write(110);        //move back leg a little
}

Credits

Jeremie

Jeremie

5 projects • 31 followers
Happy guy, Robot enthusiast, Dog lover

Comments