Today I built a “door” of sorts by connecting an ultrasonic sensor to a servo motor. Ultrasonic sensors works by having two speakers one emitting a sound and the other listing for one. Distance from an object is calculated based on how long it takes the sensor to receive this sound. A servo motor is a motor that provides positional data to the controller.

https://wcu.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=d593b5e2-5bd4-4c37-ab66-b0bd0009f7bc