I designed and built a robot with a rotating bar actuated by a servo, equipped with two ping sensors to sense objects and align to walls. Since this was before I entered the world of PID the simple P loop I installed in the code made the movement a little jerky, but it did the job. The two ping sensors pointed to a certain side depending on which direction it wanted to travel along a certain wall. It drove straight by pointing the sensors to the wall beside it, making slight turns to ensure it was parallel to the wall as it drove. To make right angle turns the sensors pointed backwards and the robot would spin until its back was parallel to the wall behind it. It was entered in and achieved first place at the CCNY STEM Symposium mechatronics competition.