An electronic device includes a main body, a drive mechanism configured to
move the main body, a detector having a plurality of sensors mounted in
the main body for detecting distances to an object which is present in a
space around the main body, a calculator configured to calculate a
direction of the object relative to the main body based on the detected
distances, and a controller configured to control the drive mechanism to
change an orientation of the main body dependent on the calculated
direction.