This is the arduino sketch for a project that uses a 3D printed robot head, powered by a servo, to turn whenever there are people passing by, which is sensed with a distance Ping sensor.