Distance sensors automatically adjust light from spot beam to flood beam according to its surroundings