Team
Divya A, Ian, Shana and Clint
Description
We began with the idea of using a single motor to create the mechanism that controlled both the bird as well as the door. Our initial plan was to create a forward thrusting lever mechanism which had two prongs sticking out of it, connected to the door. It would also have a platform for the bird. This way the forward motion would thrust the bird out, while also pushing open the door. However, this did not work out the way we expected it to - the force wasn't quite enough. We also had trouble getting our joints to stay in place with the materials we had. Even though he wasn't in our group, Shubham helped us with this.
So instead we used the opposite arms of the motor to create a lift mechanism that lifted the door upwards (in a curtain like manner) instead. Our contraption was made of a bunch of odds and ends and so we dressed it up with colored construction paper to make it look like a castle like building. Our bird is made of origami construction paper. We are considering making it look spooky by incorporating an LED with a battery as an eye.
Code
We used the Sweep library to control the clock
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.
//rubber band side goes to pin 8
#include <Servo.h>
Servo myservo1; // create servo object to control a servo
int pos = 0; // variable to store the servo position
int startPos = 50;
int endPos = 100;
void setup()
{
myservo1.attach(9); // attaches the servo on pin 9 to the servo object
myservo1.write(pos); //initial setup for legs
delay(100); // waits 15ms for the servo to reach the position
}
void loop()
{
for(pos = startPos; pos < endPos; pos += 1)
{
myservo1.write(pos);
delay(10);
}
for(pos = endPos; pos >= startPos; pos -= 1)
{
myservo1.write(pos);
delay(10);
}
}
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.
//rubber band side goes to pin 8
#include <Servo.h>
Servo myservo1; // create servo object to control a servo
int pos = 0; // variable to store the servo position
int startPos = 50;
int endPos = 100;
void setup()
{
myservo1.attach(9); // attaches the servo on pin 9 to the servo object
myservo1.write(pos); //initial setup for legs
delay(100); // waits 15ms for the servo to reach the position
}
void loop()
{
for(pos = startPos; pos < endPos; pos += 1)
{
myservo1.write(pos);
delay(10);
}
for(pos = endPos; pos >= startPos; pos -= 1)
{
myservo1.write(pos);
delay(10);
}
}
Video
We didn't take pictures of the clock, but a video that shows the entire mechanism can be viewed here:
https://www.facebook.com/photo.php?v=10153428254445065¬if_t=video_pro...
- Login to post comments