In this project, we were challenged with making a grocery store sliding door with an Arduino, ultrasonic sensor, and servo to simulate the door opening and closing.

An ultrasonic sensor works by sending short pulses of sound waves almost twice the frequency that humans can hear and listening for the echo once the sound waves bounce off an object. In the code, we set up the ultrasonic sensor to activate once it received reflected signals from less than 24 inches away. It would then turn the servo to 180 degrees to simulate the door being open from the 0-degree when closed.

Click here to watch a short video of the ultrasonic sensor moving the servo.