How to Build and Program a Mining Turtle
Crafting and Fueling the Turtle
A Turtle is crafted from a Computer plus a chest and the turtle overlay recipe. An Advanced Turtle uses an Advanced Computer in the same progression. Place the Turtle where you want it to start. Turtles need fuel to move and dig, so give them fuel items before running any movement code. Open the Turtle's interface to reach its Lua prompt.
Writing Mining Code
At the prompt, call the turtle's dig and move functions in sequence. A simple strip mine digs forward, moves forward, and repeats. Use the turtle's inspect and detect calls to check what is ahead before digging so you do not break into lava or fall into a cave. Use the turtle's place and select calls to manage its inventory when it fills up, or send it back to a chest to unload. For a mining turtle, keep the loop short and let it run for a set number of blocks, then return to the start. Save the program to a Floppy Disk in a Disk Drive so you can reload it on another Turtle without retyping. Test the program on the surface first, then place the Turtle at the dig site and run it. If the Turtle stops, check fuel and inventory space before restarting.