This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Ulthean's profile picture

Transfer a program to another turtle

Started by Ulthean, 31 December 2012 - 02:35 AM
Ulthean #1
Posted 31 December 2012 - 03:35 AM
This question must already have been asked, but I couldn't find it, so sorry for asking it again:

Is it possible to have a turtle deploy another turtle, transfer a program to it (from a floppy) and execute the program on the turtle?

Context: Multi-level branch mining program, I would like to have one turtle do everything: create a vertical shaft to bedrock, dig out the levels,
place chests etc, place turtles on each level, have them execute the branch mining program.
Orwell #2
Posted 31 December 2012 - 05:10 AM
This is possible, though a bit elaborate. You'll need a floppy with a startup program on that installs everything needed from the disk. Here is the process:
1. Make turtle A place turtle B.
2. Let turtle A place a disk drive next to turtle B. (e.g. one block above)
3. Let turtle A place a floppy in the disk drive.
4. Let turtle A go back to a block next to turtle B. (e.g. one block down again)
5. Let turtle A execute: "peripheral.call('front','turnOn')". This will turn on turtle B and makes the startup script run. This can make turtle B start the desired actions.
6. Back to disk drive.
7. Suck disk up from the disk drive.
8. Break the disk drive.
Ulthean #3
Posted 31 December 2012 - 06:15 AM
This is possible, though a bit elaborate. You'll need a floppy with a startup program on that installs everything needed from the disk. Here is the process:
1. Make turtle A place turtle B.

8. Break the disk drive.

Thanks! Tested and works flawlessly, this is exactly what I needed.