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

Turn on a computer with redstone

Started by ExDomino, 20 May 2015 - 05:52 AM
ExDomino #1
Posted 20 May 2015 - 07:52 AM
I don't know if it is already possible, but my suggestion is a way to turn on a computer with a redstone signal. Maybe a new peripheral a computer should have to be able to be turned on with a redstone signal. And if the chunk is loaded and the redstone signal is still powered, the computer is turned on again. A shutdown would acts as a reboot if the component is powered by a redstone signal.

You could maybe do that with that peripheral, computer need the redstone signal to be on, so without signal the computer is shutted down. So with the peripheral there is no longer way to shutdown the computer without terminate the redstone signal first.
Edited on 20 May 2015 - 05:54 AM
flaghacker #2
Posted 20 May 2015 - 11:47 AM
You can code this yourself by replacing os.shutdown () with your own version. You could also make a startup program that checks the redstone signal before continuing.
ExDomino #3
Posted 20 May 2015 - 12:16 PM
How to do that? When the computer is off, no program can be executed.
flaghacker #4
Posted 20 May 2015 - 12:35 PM
You can pretend like it's off by not drawing anything to the screen and by not reacting to events.
ExDomino #5
Posted 20 May 2015 - 12:40 PM
When the chunk is unloaded or when the game/server is closed, all computers are shutted down. I'm not sure if it's a bug or not, but there is at this moment no way to open a computer except of right clic on it (or via network if at least one of them is still on, via computer api).
Lupus590 #6
Posted 20 May 2015 - 12:45 PM
Computers that were on when the chunk unloads should restart when the chunk is reloaded.

On may be an option for you.
wilcomega #7
Posted 09 June 2015 - 11:53 AM
using the peripheral api you can wrap a computer or turtle like any other peripheral and use a function to turn it on or off or restart it
Silver07 #8
Posted 13 February 2016 - 04:08 AM
Computers that were on will turn back on and attempt to execute "/startup" if there is one. You could do the following…

term.clear()
term.setCursorPos(1,1)
while true do
if redstone.getInput(<:string:side>)==true then
break
else
--Do absolutely nothing :P/>/>
end
end
print(os,version())
term.setTextColor(colours.yellow)
term.write("> ")
term.setTextColor(colours.white)
Replace <:string:side> with "front","back","left","right","top", or "bottom"
Edited on 13 February 2016 - 03:09 AM
COOLGAMETUBE #9
Posted 28 March 2016 - 05:32 PM
you can run Computers after connecting a computer to this computer as peripheral

local comp = peripheral.wrap("computer_<ID>")
comp.run() -- or something--
Edited on 28 March 2016 - 03:35 PM