Bird Feeder Program Control
home | videos | construction | control | lab book | results | team

Bird Controller
;Control a gear train that winds
;and unwinds a string to let
;a model bird drop from the top
;of the box onto the bird feeder
;and then rise back to the top.

to bird-control
;Turn on the motor to unwind and
;then wind the string.
a, on

;Reverse direction when the bird
;hits the touch sensor at the top
;of the box.
waituntil [switcha]
a, rd

;Let the bird drop about 1 inch
;so the touch sensor opens.
waituntil [not switcha]
wait 3
a, off

;wait 15 seconds for the next bird
;to land.
wait 150

;start the next cycle
bird-control


Camera Controller
;When a bird lands,
;turn on the motor that controls the
;shutter plunger until the camera
;button is pushed.

to camera-control

;Turn on the shutter moter when
;a bird lands.
waituntil [switcha
] a, on

;Turn the motor off when the camera
;button has been pushed and
;the plunger is in position
;to take the next picture.
waituntil [switchb]
wait 10
a, off

;Wait 10 seconds before taking
;another picture.
wait 100

;Get ready to take the next picture.
bird-control


Build-It-Yourself, 426 Broadway, Cambridge, MA 02138 Tel: (617) 547-9705 Email