Icarus

I initially wanted to imitate the graceful movement of a bird’s wings flapping to a certain pattern. However due to my materials and construction efforts, instead I made an extremely aggressive bird, which is fitting as October 31st is approaching anyway.

The setup with the coding is very basic; I simply wrote two loops for two servo motors to move up and down at progressing speeds. It’s slightly slower as the servos move upwards in an attempt to replicate the pattern of bird wings flapping. Then, I attached the cardboard wings and tried creating a stable structure to support these motors. The construction is definitely lacking; tape is far too weak to hold up against the consistently moving motors, which proved rather heavy for the support. If anything, the construction was the most challenging. However, for getting the idea across for the movement, the project was relatively successful. I would like to continue working with servo motors in the future to make more graceful structures; so this will definitely be something I revisit.

 

#include <Servo.h>

Servo servo;
Servo servo2;
int position = 0;

void setup() {
  // put your setup code here, to run once:
servo.attach(9);
servo2.attach(10);
}

void loop() {
  // put your main code here, to run repeatedly:
for (position = 0; position <=180; position +=1){
   servo2.write(position);
  delay(2);
}

for(position = 180; position>=0; position -=1){
  servo2.write(position);
  delay(1);
}
 
for (position = 0; position <=180; position +=1){
   servo.write(position);
  delay(2);
}

for(position = 180; position>=0; position -=1){
  servo.write(position);
  delay(1);
}

}

 

 

Leave a Reply