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

[CC+RedPower] Detecting signal from bundled cable

Started by moomoohk, 19 March 2012 - 10:03 PM
moomoohk #1
Posted 19 March 2012 - 11:03 PM
So I'm working on a door that gets opened by the computer and closed when the computer receives input from a bundled cable that's hooked up to a button.
How can I detect when I'm receiving a signal from a bundled cable?

Thanks
Wolvan #2
Posted 19 March 2012 - 11:05 PM
Just type help redpower and then you can see how to detect the inputs
Dirkus7 #3
Posted 25 March 2012 - 11:42 PM
Use rs.getBundledInput(side) to detect if there is a redpower signal, it will return a number (which is the color, you can find the number in the mods/ComputerCraft/lua/rom/apis/colors)

Use this to wait for signal:
os.pullEvent('redstone')
If rs.getBundledInput(side) == color then

End