I'm looking at your code and trying to improve it at the moment but I have a question about your sweep() function.
function sweep()
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
end
For one, this could be improved with 2 for statements but why do you go up 7 times and then go down 8 times ? Don't you have one turtle.down() too much ?
Also for bigger farms, only dropping out the first 3 slots might not be enough, try this:
local f = 1
while f < 17 do
turtle.select(f)
turtle.drop()
f = f + 1
end
f = 1
instead of this :
turtle.drop()
turtle.select(2)
turtle.drop()
turtle.select(3)
turtle.drop()
turtle.select(1)
One last edit; why are you using repeats everywhere, while loops are easier to make and shorter. Let me show you :)/>
This is what I made out of yours, I still need to make the Sweep() function more energy-efficient though.
function sweep()
for i=1, 7 do
turtle.dig()
turtle.up()
end
turtle.dig()
for i=1, 7 do
turtle.down()
end
end
function rotate()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
print("Starting Tapping Route...")
turtle.forward()
repeat
for i=1, 4 do
sweep()
rotate()
end
turtle.turnLeft()
turtle.forward()
if turtle.forward() then
turtle.turnRight()
x = false
else
turtle.turnRight()
turtle.forward()
turtle.forward()
if turtle.forward() then
turtle.back()
turtle.turnRight()
while turtle.detect() == false do
turtle.forward()
end
turtle.back()
turtle.turnLeft()
else
x = true
end
end
until x
turtle.turnRight()
while turtle.detect() == false do
turtle.forward()
end
turtle.turnRight()
while turtle.detect() == false do
turtle.forward()
end
local f = 1
while f < 17 do
turtle.select(f)
turtle.drop()
f = f + 1
end
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.turnLeft()
print("Finished cycle.")