We built the Lego House with an automatic garage door opener, its own alarm, automatic lock, and it even had a lamp. We could drive the car in the garage and then it would close behind the car. Then the lock would open so that the person could go inside. The alarm would go on after the door closed.
There were a few problems we had along the way. The lock would open too much and would hit the wall. Also, the alarm was a little stubborn. It wouldn't flash, but it's all fixed.
Below is a picture and the programming
TO GARAGE
TALKTO "MOTORB
SETLEFT ONFOR 8
WAIT 20
SETRIGHT ONFOR 7
ALARM
END
TO CAR
TALKTO "LAMPH
ON
IF LIGHT5 < 38 [GARAGE]
CAR
END
TO LOCK
TALKTO "MOTORA
SETLEFT ONFOR 10
TALKTO "LAMPC FLASH 4 2
WAIT 5 ALARM
TALKTO "MOTORA
SETRIGHT ONFOR 10
END
TO ALARM
REPEAT 10[TONE 80 3 TONE 70 3]
END
TO HOUSE
CAR
LOCK
END