Froggy World 2 the Boot
by MikeTheMaker in Workshop > 3D Printing
2827 Views, 7 Favorites, 0 Comments
Froggy World 2 the Boot
Polybelt.com for a 40 inch long by 2 inch wide belt
vxb.com for bearings
sciplus.com for a motor (I used #40588, a gear motor intended to move automobile seats)
Files for the 3d printed parts are available at:
http://www.thingiverse.com/thing:45303
Start by making a "roller," 2 inches wide with a 2 inch diameter. I used a 1/4 inch diameter wood rod for the axle.
If you're smart (not like me), you'll put the roller guides on the rollers at this step--to keep the belt from slipping off.
#include <Servo.h>
Servo boot;
int start=10;
int next=7;
int val=0;
const int pwmA=3;
const int brakeA=9;
const int dirA=12;
int trigger=0;
int dummy=0;
int timer=0;
int once=0;
void setup ()
{boot.attach(5);
pinMode(start, INPUT);
pinMode(next, OUTPUT);
digitalWrite(next, HIGH);
boot.write(250);
delay(1000);
}
void loop()
{val=digitalRead(start);
if(val==LOW or dummy==1)
{boot.write(75);//raise boot
dummy=1;
delay(200);
pinMode(dirA, OUTPUT);
pinMode(brakeA, OUTPUT);
digitalWrite (dirA, LOW);//forward
digitalWrite(brakeA, LOW);//release brake
analogWrite(pwmA, 125); //speed motor
trigger=analogRead(5);
if(trigger >200)
{boot.write(250);
delay(500);
boot.write(75);
once=once+1;
}
else if(once>1)
{delay (8000);
analogWrite (pwmA, 0);
digitalWrite (brakeA, LOW);//stop motor
boot.write(250);
dummy=0;
timer=0;
once=0;
digitalWrite(next, LOW);
delay(1000);
digitalWrite(next, HIGH);
}
else if (timer >40)
{once =2;
}
timer=timer +1;
}}
Set "The Boot" about five inches from the end of "Catapult," power on and let them go!