<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rockymc</id>
		<title>ComputerCraft Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rockymc"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/Special:Contributions/Rockymc"/>
		<updated>2026-07-11T19:19:52Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_Tutorial&amp;diff=401</id>
		<title>Turtle Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_Tutorial&amp;diff=401"/>
				<updated>2012-02-25T00:45:53Z</updated>
		
		<summary type="html">&lt;p&gt;Rockymc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
This tutorial will teach you the functions of the Turtle API, and also will teach you how to make your first turtle program.&lt;br /&gt;
by: rockymc&lt;br /&gt;
&lt;br /&gt;
== Turtle ==&lt;br /&gt;
&lt;br /&gt;
The Turtle API is used to work with your Turtles. Here is a list of the complete Turtle API.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|turtle.forward()&lt;br /&gt;
|Let the Turtle move forward&lt;br /&gt;
|-&lt;br /&gt;
|turtle.back()&lt;br /&gt;
|Let the Turtle move back&lt;br /&gt;
|-&lt;br /&gt;
|turtle.up()&lt;br /&gt;
|Let the Turtle move up&lt;br /&gt;
|-&lt;br /&gt;
|turtle.down()&lt;br /&gt;
|Let the Turtle move down &lt;br /&gt;
|-&lt;br /&gt;
|turtle.turnLeft()&lt;br /&gt;
|The Turtle turns left&lt;br /&gt;
|-&lt;br /&gt;
|turtle.turnRight()&lt;br /&gt;
|The Turtle turns right&lt;br /&gt;
|-&lt;br /&gt;
|turtle.select( slotNum )&lt;br /&gt;
|The Turtle selects the given Slot (1 is top left, 9 is bottom right)&lt;br /&gt;
|-&lt;br /&gt;
|turtle.getItemCount( slotNum )&lt;br /&gt;
|Counts how many items are in the given Slot&lt;br /&gt;
|-&lt;br /&gt;
|turtle.getItemSpace( slotNum )&lt;br /&gt;
|Counts how many items you need to fill the stack in the given Slot&lt;br /&gt;
|-&lt;br /&gt;
|turtle.dig()&lt;br /&gt;
|Breaks the Block in front&lt;br /&gt;
|-&lt;br /&gt;
|turtle.digUp()&lt;br /&gt;
|Breaks the Block above&lt;br /&gt;
|-&lt;br /&gt;
|turtle.digDown()&lt;br /&gt;
|Breaks the Block below&lt;br /&gt;
|-&lt;br /&gt;
|turtle.place()&lt;br /&gt;
|Places a Block of the selected Slot in front&lt;br /&gt;
|-&lt;br /&gt;
|turtle.placeUp()&lt;br /&gt;
|Places a Block of the selected Slot above&lt;br /&gt;
|-&lt;br /&gt;
|turtle.placeDown()&lt;br /&gt;
|Places a Block of the selected Slot below&lt;br /&gt;
|-&lt;br /&gt;
|turtle.detect()&lt;br /&gt;
|Detects if there is a Block in front&lt;br /&gt;
|-&lt;br /&gt;
|turtle.detectUp()&lt;br /&gt;
|Detects if there is a Block above&lt;br /&gt;
|-&lt;br /&gt;
|turtle.detectDown()&lt;br /&gt;
|Detects if there is a Block below&lt;br /&gt;
|-&lt;br /&gt;
|turtle.drop()&lt;br /&gt;
|Drops everything of the selected Slot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For our program, we will use turtle.detectDown(), turtle.digDown(), turtle.down() and turtle.forward(). It is recommended that you learn what method does what before messing up with Turtles.&lt;br /&gt;
&lt;br /&gt;
== The Program ==&lt;br /&gt;
So, for you to make the Turtle program, first craft a Turtle.&lt;br /&gt;
&lt;br /&gt;
[[File:Turtle-craft.png]]&lt;br /&gt;
&lt;br /&gt;
Then make a Mining Turtle.&lt;br /&gt;
&lt;br /&gt;
[[File:Turtle-craft2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, place it anywhere you want. Run 'edit MyFirstTurtleProgram', where MyFirstTurtleProgram can be whatever you want.&lt;br /&gt;
So, inside the file, type:&lt;br /&gt;
 while turtle.detectDown() do&lt;br /&gt;
 print(&amp;quot;Digging down!&amp;quot;)&lt;br /&gt;
 turtle.digDown()&lt;br /&gt;
 print(&amp;quot;Going down!&amp;quot;)&lt;br /&gt;
 turtle.down()&lt;br /&gt;
 print(&amp;quot;Digging forward!&amp;quot;)&lt;br /&gt;
 turtle.dig()&lt;br /&gt;
 print(&amp;quot;Going forward!&amp;quot;)&lt;br /&gt;
 turtle.forward()&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
To save the program, press CTRL and select SAVE with the Arrow Keys. After that, type MyFirstTurtleProgram (or whatever you called your program).&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
&lt;br /&gt;
The line while turtle.detectDown() do makes the program run until there is no block underneath the Turtle.&lt;br /&gt;
&lt;br /&gt;
The turtle.digDown() will make the Turtle dig down.&lt;br /&gt;
&lt;br /&gt;
The part where it says turtle.forward() will make the Turtle go forward.&lt;br /&gt;
&lt;br /&gt;
The line that says turtle.dig() will make the Turtle dig forward.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: this should be running on a mining turtle, or it wont work!&lt;br /&gt;
&lt;br /&gt;
== Author ==&lt;br /&gt;
[[User:Rockymc|rockymc]]&lt;/div&gt;</summary>
		<author><name>Rockymc</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle_Tutorial&amp;diff=400</id>
		<title>Turtle Tutorial</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle_Tutorial&amp;diff=400"/>
				<updated>2012-02-25T00:43:55Z</updated>
		
		<summary type="html">&lt;p&gt;Rockymc: Created page with &amp;quot;Category:Tutorials This tutorial will teach you the functions of the Turtle API, and also will teach you how to make your first turtle program. by: rockymc  == Turtle ==  ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
This tutorial will teach you the functions of the Turtle API, and also will teach you how to make your first turtle program.&lt;br /&gt;
by: rockymc&lt;br /&gt;
&lt;br /&gt;
== Turtle ==&lt;br /&gt;
&lt;br /&gt;
The Turtle API is used to work with your Turtles. Here is a list of the complete Turtle API.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|turtle.forward()&lt;br /&gt;
|Let the Turtle move forward&lt;br /&gt;
|-&lt;br /&gt;
|turtle.back()&lt;br /&gt;
|Let the Turtle move back&lt;br /&gt;
|-&lt;br /&gt;
|turtle.up()&lt;br /&gt;
|Let the Turtle move up&lt;br /&gt;
|-&lt;br /&gt;
|turtle.down()&lt;br /&gt;
|Let the Turtle move down &lt;br /&gt;
|-&lt;br /&gt;
|turtle.turnLeft()&lt;br /&gt;
|The Turtle turns left&lt;br /&gt;
|-&lt;br /&gt;
|turtle.turnRight()&lt;br /&gt;
|The Turtle turns right&lt;br /&gt;
|-&lt;br /&gt;
|turtle.select( slotNum )&lt;br /&gt;
|The Turtle selects the given Slot (1 is top left, 9 is bottom right)&lt;br /&gt;
|-&lt;br /&gt;
|turtle.getItemCount( slotNum )&lt;br /&gt;
|Counts how many items are in the given Slot&lt;br /&gt;
|-&lt;br /&gt;
|turtle.getItemSpace( slotNum )&lt;br /&gt;
|Counts how many items you need to fill the stack in the given Slot&lt;br /&gt;
|-&lt;br /&gt;
|turtle.dig()&lt;br /&gt;
|Breaks the Block in front&lt;br /&gt;
|-&lt;br /&gt;
|turtle.digUp()&lt;br /&gt;
|Breaks the Block above&lt;br /&gt;
|-&lt;br /&gt;
|turtle.digDown()&lt;br /&gt;
|Breaks the Block below&lt;br /&gt;
|-&lt;br /&gt;
|turtle.place()&lt;br /&gt;
|Places a Block of the selected Slot in front&lt;br /&gt;
|-&lt;br /&gt;
|turtle.placeUp()&lt;br /&gt;
|Places a Block of the selected Slot above&lt;br /&gt;
|-&lt;br /&gt;
|turtle.placeDown()&lt;br /&gt;
|Places a Block of the selected Slot below&lt;br /&gt;
|-&lt;br /&gt;
|turtle.detect()&lt;br /&gt;
|Detects if there is a Block in front&lt;br /&gt;
|-&lt;br /&gt;
|turtle.detectUp()&lt;br /&gt;
|Detects if there is a Block above&lt;br /&gt;
|-&lt;br /&gt;
|turtle.detectDown()&lt;br /&gt;
|Detects if there is a Block below&lt;br /&gt;
|-&lt;br /&gt;
|turtle.drop()&lt;br /&gt;
|Drops everything of the selected Slot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For our program, we will use turtle.detectDown(), turtle.digDown(), turtle.down() and turtle.forward(). It is recommended that you learn what method does what before messing up with Turtles.&lt;br /&gt;
&lt;br /&gt;
== The Program ==&lt;br /&gt;
So, for you to make the Turtle program, first craft a Turtle.&lt;br /&gt;
&lt;br /&gt;
[[File:Turtle-craft.png]]&lt;br /&gt;
&lt;br /&gt;
Then make a Mining Turtle.&lt;br /&gt;
&lt;br /&gt;
[[File:Turtle-craft2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, place it anywhere you want. Run 'edit MyFirstTurtleProgram', where MyFirstTurtleProgram can be whatever you want.&lt;br /&gt;
So, inside the file, type:&lt;br /&gt;
 while turtle.detectDown() do&lt;br /&gt;
 print(&amp;quot;Digging down!&amp;quot;)&lt;br /&gt;
 turtle.digDown()&lt;br /&gt;
 print(&amp;quot;Going forward!&amp;quot;)&lt;br /&gt;
 turtle.forward()&lt;br /&gt;
 print(&amp;quot;Digging forward!&amp;quot;)&lt;br /&gt;
 turtle.dig()&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
To save the program, press CTRL and select SAVE with the Arrow Keys. After that, type MyFirstTurtleProgram (or whatever you called your program).&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
&lt;br /&gt;
The line while turtle.detectDown() do makes the program run until there is no block underneath the Turtle.&lt;br /&gt;
&lt;br /&gt;
The turtle.digDown() will make the Turtle dig down.&lt;br /&gt;
&lt;br /&gt;
The part where it says turtle.forward() will make the Turtle go forward.&lt;br /&gt;
&lt;br /&gt;
The line that says turtle.dig() will make the Turtle dig forward.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: this should be running on a mining turtle, or it wont work!&lt;br /&gt;
&lt;br /&gt;
== Author ==&lt;br /&gt;
[[User:Rockymc|rockymc]]&lt;/div&gt;</summary>
		<author><name>Rockymc</name></author>	</entry>

	</feed>