Introduction: Arduino Bird Trap

Picture of Arduino Bird Trap

it is a simple fun arduino project that let you catch birds , its only for fun .

Step 1: The Body

Picture of The Body

you will sheets of wood (most likely) but you can use all sorts of stuff like paper ,steel ,plastic ......

i didn't do the measurements but it is pretty simple and I am sure will will do fine.

Step 2: The Material

Picture of The Material

the electronic material are :

-arduino (14$)

-a servo (4$)

-some jump wires(1$)

-a bred board(3$)

-a push button(0.5$)

Step 3: Wiring It Up

Picture of Wiring It Up

it is pretty simple

Step 4: The Code

just copy past:

#include Servo myservo; // create servo object to control a servo

#define ServoM 12 //Connected to the servo motor. #define In 8 //Pin connected to the IN button. #define BarLow 180 //Low position of the barrier. #define BarUp -90 //Up position of the barrier. #define trigPin 7 //TRING PIN 7 #define echoPin 6 //ECHO PIN 6

//================================================================

void setup(){ myservo.attach(ServoM); // attaches the servo. Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(In, INPUT); // set "IN" button pin to input digitalWrite(In, HIGH); // Connect Pull-Up resistor. myservo.write(BarLow); //Barrier in the low position // delay(1000); }

//================================================================ void loop(){

long duration, distance; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration/2) / 29.1; //================================================================ if(digitalRead(In)==0) { myservo.write(BarLow);

} if (distance <6) { myservo.write(BarUp);}

}

//================================================================

Step 5: Finnaly

now it is pretty simple

-the servo controls the door

-the button open the door

- if sonar sensor detect anything closer than 7 cm the door closes

and now it's up to u put a little bol ,fell it with bird food ,put the sonar sensor next to it and wait to catch a bird

hope you enjoy it subscribe for more

Comments

audreyobscura (author)2014-05-27

Did you actually make this project yet?

why???

yes I did it

wliu3 (author)2014-05-26

It's a bad idea to catch a bird. You don't know what disease does it carry. Something like H5N1 may be carried y the bird and you have a certain chance of getting infected.

dani abou zamel (author)wliu32014-05-27

thank u for your consern

unmitigatedaudacity (author)2014-05-26

What will you do with the bird? grill it, or feed it to the cat?

Consider someone catches you this way

do not be this sensetive I am going to catch it ,feed him, keep it for a while then let it go

I love animals I have a dog a cat some duks and fishes and frogs

unmitigatedaudacity (author)2014-05-26

What will you do with the bird? grill it, or feed it to the cat?

Consider someone catches you this way

About This Instructable

2,576views

7favorites

License:

More by dani abou zamel:The Best Trick To Teach Your Dog While WalkingDIY time-bombhow to teach your dog to sit easely
Add instructable to: