while true do
    if turtle.detectUp() then
      turtle.digUp()
    end
    turtle.dropDown()
end

