Picture of the gutted bird. I think I broke the connection that control the movement of the wings. Or lost the piece. I will take better note and care when disassemble a toy.
Picture of bird put back together. The goal of my project was to have to movement be controlled by the press of the tongue but was unable to do so. The movement is now controlled by the micro controller in set time intervals. The motor runs clockwise, stops, and then counter clockwise.
Video of the Bird in action. Movement is controlled by micro controller. It moves in time intervals that can be change with the PC. The wings are suppose to move with the movement of the head but they do not. More debugging and more attention to detail when taking the bird apart would of safeguarded against breaking the wing movement. But the motor at least does controll the head movement. The project was fun and rewarding.
Code for Bird project:
void setup ()
{
pinMode (6,OUTPUT); // input for relayswitch
pinMode (7,OUTPUT); // input for relayswitch
}
void loop ()
{
digitalWrite (6, HIGH); // inputs high to motor
digitalWrite (7,HIGH); // inputs high to motor
delay (5000); // duration of movement
digitalWrite (7,LOW); // inputs low to motor
delay (1000); // stops movement for 1 second
digitalWrite (6,LOW); // reverse movement for motor
delay (2000); // duration of movement
}
No comments:
Post a Comment