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

PC checks its putting out Redstone signal (need help)

Started by ExtraRandom, 02 September 2012 - 12:57 AM
ExtraRandom #1
Posted 02 September 2012 - 02:57 AM
how do you make it so you go to your pc type in something like "Door" and if the redstone current was coming out it would turn that current off and the door would shut without having Door-open and Door-off

kinda basicly put how do u make it detect its putting out an input and how it changes the redstone output
Matrixmage #2
Posted 02 September 2012 - 03:02 AM
You can use "rs.setOutput("side you want", true or false)" to set a redstone signal and you can use rs.getInput("side you want") to see if a signal is being sent on that side.
MysticT #3
Posted 02 September 2012 - 03:17 AM
You can use rs.getOutput(side) to check if the output is on.
A simple and short way to switch output is:

rs.setOutput(side, not rs.getOutput(side))
ExtraRandom #4
Posted 02 September 2012 - 03:34 AM
ok thanks got it working

one more thing, im making a system where theres a secret door activated by a pc to get down (which then closes after 4 seconds) and then theres another pc down the bottom which you use to get back up again well i have a pc which i want to detect when the door has been used by when the signal is off, when its off a message is put on a monitor next to it, but me being a CC Noob i have no idea how to do this