Hi, I made some modifications to your programme.
-77 minutes rather than 40 is optimal for farming in this arrangement. yes i did the calculations
-previously it was having some issues selecting seeds if it was not in the right slot. now you may place seeds in any slot and it will use them.
-it will actually refuel now - place the coal in any slot.
-at the end, it will dump its entire inventory in an inventory to its right, and pick up 2 stacks of the inventory to the left. i do this to prevent seeds clogging it up. i use a relay on the right, leading to a seed-filter and chest on the left, the wheat goes to another chest entirely.
--[[
12 X 12 farm
]]--
local function move()
turtle.digDown()
slot=1
while not turtle.placeDown() do
turtle.select(slot)
slot=slot+1
if slot>16 then
break
end
end
while not turtle.forward() do
sleep(1)
end
end
local function move2()
while not turtle.forward() do
sleep(1)
end
end
local function plow()
while not turtle.up() do
sleep(1)
end
move2()
for o = 1,6 do
for i = 1,12 do
move()
end
turtle.turnRight()
move()
turtle.turnRight()
move()
for i = 1,12 do
move()
end
turtle.turnLeft()
move2()
turtle.turnLeft()
move2()
end
for i = 1,12 do
move()
end
move()
while not turtle.down() do
sleep(1)
end
turtle.turnLeft()
turtle.turnLeft()
end
local iRepeat = 0
local iMin = 77
local iCount = 0
local spacer = ""
while true do
term.clear()
term.setCursorPos(1,4)
print("Fuel Remaning : "..tostring(turtle.getFuelLevel()))
term.setCursorPos(1,1)
iRepeat = iRepeat+1
print("plowing :"..iRepeat)
for i = 1,16 do
turtle.select(i)
turtle.refuel()
end
plow()
turtle.turnRight()
for slot=1,16 do
turtle.select(slot)
sleep(0.1)
turtle.drop()
end
turtle.turnLeft()
turtle.turnLeft()
sleep(5)
for i = 1,3 do
sleep(1)
turtle.suck()
end
turtle.turnRight()
term.setCursorPos(1,4)
print("Fuel Remaning : "..tostring(turtle.getFuelLevel()))
iCount = iMin
while true do
iCount = iCount-1
term.setCursorPos(1,2)
term.clearLine()
print("sleeping "..iMin.." minuites")
for i = 59,0,-1 do
sleep(1)
term.setCursorPos(1,3)
term.clearLine()
if i < 10 then
spacer = "0"
else
spacer = ""
end
write("To go "..iCount..":"..spacer..i)
end
if iCount == 0 then
break
end
end
end