Avoid unnecessary digitalWrites in the distance_sensor example.