I feel bad for posting this seeing as someone recently posted another version… The code itself is really simple. The design that I use is also modular which makes for easy expansion. Here it is:
[media]http://www.youtube.com/watch?v=CnJJDkoEwSg[/media]



turtle.select(1)
turtle.dropDown()
turtle.select(2)
turtle.dropDown()
turtle.select(3)
turtle.dropDown()

redstone.setOutput("top",true)
redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("top", false)
redstone.setOutput("back",false)

turtle.select(2)
while turtle.getItemCount(1) > 0 do
turtle.place()
turtle.select(1)
turtle.place()
turtle.select(2)
turtle.dig()
end
os.queueEvent("trick")
os.pullEvent()

shell.run("Farm")