Posted 30 September 2012 - 12:17 PM
Ok, I've researched a little and discovered how to make some basic programs.
Now this is the very first thing I've EVER done in computercraft, well… except for just making a computer print "Mitchfizz05's Computer" when I turn it on.
This turtle program will make a turtle drive, and whenever their is a block in front of it, it will turn right.
If the turtle isn't on a block, it will stop there.
Oh, and if anyone knows how to make a turtle know what block is under it or in front of it, that would help me alot. :)/>/>
For me, it's a big achievement.
Also, if you want the startup code to go on a floppy disk, here it is:
Now this is the very first thing I've EVER done in computercraft, well… except for just making a computer print "Mitchfizz05's Computer" when I turn it on.
This turtle program will make a turtle drive, and whenever their is a block in front of it, it will turn right.
If the turtle isn't on a block, it will stop there.
Oh, and if anyone knows how to make a turtle know what block is under it or in front of it, that would help me alot. :)/>/>
print("Will begin driving in 3 seconds!")
sleep(1)
print("2 seconds!")
sleep(1)
print("1 second!")
sleep(1)
print("Begun driving!")
while true do
if turtle.detect() then
turtle.turnRight()
end
turtle.forward()
if turtle.detectDown() then
else
break
end
end
I know it is a boring program, well not boring (quite fun actually) but simple. I thought I'd upload it anyway.For me, it's a big achievement.
Also, if you want the startup code to go on a floppy disk, here it is:
print("Copying files to turtle...")
fs.copy("disk/drive","drive")
print("Copy complete!")
print("Running program...")
shell.run("drive")
And once again, if anyone knows how to make a turtle detect WHAT block is in front of it or below it, please tell me. :(/>/>