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

redstone signal to bootup/start running control programs

Started by c1one1, 25 January 2014 - 08:15 PM
c1one1 #1
Posted 25 January 2014 - 09:15 PM
So i'm new to computercraft but i've been learning how to use bundled cables with computercraft computers and i'm using it to create a control system for a factory.

right now i'm having the issue that this control program needs to be started manually everytime i load my world.

the program runs on a loop testing against input signals and responding appropriately. (eg. maintaining the temperature of a nuclear reactor) but if the control program isn't running my entire factory could go nuclear

i'm wanting some form of persistent solution. so that whenever i load the world, the control program launches without manual input.

(remembering that i'm not looking for a solution within a program, but to start the program in the first place)
OReezy #2
Posted 25 January 2014 - 10:41 PM
Just name the program "startup" then it will start automatically when the computer boots.
surferpup #3
Posted 25 January 2014 - 11:28 PM
When you are in the os of the computer, type:


rename myProgramName startup

Whenever the computer restarts or boots up, it will run.
c1one1 #4
Posted 26 January 2014 - 06:58 AM
thanks you guys…
One side question… is there a way to remotely boot the computer as well?
surferpup #5
Posted 26 January 2014 - 05:10 PM
Sure. Wrap a wired or attached computer with peripheral.wrap(). Then call the reboot() function.


local myRemoteComputer = peripheral.wrap("right")
myRemoteComputer.reboot()

See Computer Peripheral Functions.
Edited on 26 January 2014 - 09:31 PM