How is a photocell used in an automatic garage door opener?
An infrared beam is generated on one side of the garage door opening and pointed at a photocell across the opening to the other side of the door opening close to the floor of the garage. If this beam is ever broken by a car,a cat, a toddler, etc. while the door is coming down, then the motor reverses and the door goes up. That way the door will never crush anything when it gets to the ground. Or if you dont pull the car into the garage far enough, It wont come down on the car and damage it.