8 posts
Posted 30 July 2012 - 09:43 PM
Hello folks,
once again i have a question since i found nothing on wiki or in this forum.
Is it somehow possible to active a computer and a program start just by simply stepping over a pressure plate?
Iam asking because yesterday i set up a big mointor with a text on it and everytime i leave it running alone for a while i had to restart the programm on the computer cause it will shutdown after a while
If anyone knows i would appreciate thx
15 posts
Posted 30 July 2012 - 10:03 PM
To my knowledge, you cannot activate or "start" an (inactive/offline) computer with a redstone current such as provided by a pressure plate; though an active computer can interact with them as well as transmit its own signals. I believe that a player has to access it in order to turn it on. I can offer a suggestion that will at least save you some time in the restart process. Add a startup file to your computer with "edit startup" and give it instructions to launch your program. This file will be accessed whenever your computer is turned on or reboots, saving you some typing.
Edited on 30 July 2012 - 08:04 PM
8 posts
Posted 30 July 2012 - 10:19 PM
thx for the reply, its sad cause i think it can be a usefull feature to turn on offline computers by a preassure plate
anyways id stick for now with the startup or implement a loop in my source so that the computer runs all the time my textdisplay programm instead shuting down completely
167 posts
Posted 30 July 2012 - 10:24 PM
thx for the reply, its sad cause i think it can be a usefull feature to turn on offline computers by a preassure plate
anyways id stick for now with the startup or implement a loop in my source so that the computer runs all the time my textdisplay programm instead shuting down completely
Honestly that logically wouldn't make sense though. Just change your program to not shutdown the computer.
113 posts
Posted 30 July 2012 - 10:26 PM
Maybe this would work?
if not rs.getInput("side") then
os.shutdown()
end
I think that would work, if you put that in a startup file, it would require power, i.e. you to be stepping on a pressure plate to turn on.
I'm testing now.
EDIT: That won't work. I am clueless.
1111 posts
Location
Portland OR
Posted 30 July 2012 - 10:47 PM
The only way to do it that I know of is to use two computers. Have one turn the other on by accessing it like a peripheral.
I still think it would be awesome if someone who knows java would make a periph for CC that did this. You apply redstone signal to it and it toggles the computer from either off to on or on to off.
8 posts
Posted 31 July 2012 - 12:00 AM
The only way to do it that I know of is to use two computers. Have one turn the other on by accessing it like a peripheral.
I still think it would be awesome if someone who knows java would make a periph for CC that did this. You apply redstone signal to it and it toggles the computer from either off to on or on to off.
can you give an code example for that? would be awesome id rather go with two computers instead of monitoring my comp if it shuts down again
8543 posts
Posted 31 July 2012 - 01:11 AM
It sounds like you're asking for something, but actually want something else. Have you tried adding the welcome program to the startup?
1111 posts
Location
Portland OR
Posted 01 August 2012 - 03:33 AM
Doing it with another computer only takes a couple lines of code, very easy.
local computer = peripheral.wrap( "top" ) -- change to side computer is on that you want to control
computer.turnOn() -- use the var computer from the above line
Other commands available when you use a computer as a peripheral are.
computer.shutdown()
computer.reboot()
computer.getid()
This will also work with Turtles. Hope this helps.
:ph34r:/>/> 500th post woot!!
Edited on 01 August 2012 - 02:04 AM
2447 posts
Posted 01 August 2012 - 08:47 AM
Why don't you just have the computer not doing anything until it gets a rednet signal? Why is it so important that it is fully off?
236 posts
Location
Germany
Posted 01 August 2012 - 09:59 AM
Maybe this would work?
if not rs.getInput("side") then
os.shutdown()
end
I think that would work, if you put that in a startup file, it would require power, i.e. you to be stepping on a pressure plate to turn on.
I'm testing now.
EDIT: That won't work. I am clueless.
you probably could use os.reboot() that should work as startup file
8543 posts
Posted 01 August 2012 - 03:43 PM
Guys, read the last part of the original post again. He just wants the program to run automatically on startup.