Jump to content

redstone signal to bootup/start running control programs

4 replies to this topic

#1 c1one1

  • New Members
  • 2 posts

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)

#2 OReezy

  • Members
  • 91 posts

Posted 25 January 2014 - 10:41 PM

Just name the program "startup" then it will start automatically when the computer boots.

#3 surferpup

  • Members
  • 286 posts
  • LocationUnited States

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.

#4 c1one1

  • New Members
  • 2 posts

Posted 26 January 2014 - 06:58 AM

thanks you guys...
One side question... is there a way to remotely boot the computer as well?

#5 surferpup

  • Members
  • 286 posts
  • LocationUnited States

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")

See Computer Peripheral Functions.

Edited by surferpup, 26 January 2014 - 10:31 PM.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users