while true do
 n=0
 while (n < 100) and not turtle.detect() do
  redstone.setOutput("front",n%2==0)
  sleep(.2)
  n=n+1
 end
 if n >=100 then
  turtle.place()
 end
 turtle.dig()
 redstone.setOutput("front",true)
 sleep(.1)
 redstone.setOutput("front",false)
 cobbleAmmount=turtle.getItemCount(1)
 if cobbleAmmount > 1 then
  if (not turtle.dropDown(cobbleAmmount-1)) and (cobbleAmmount > 50) then
   sleep(30)
  end
 end
  -- sleep(1.2)
end
