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

[Question] Detecting Redpower Cable Colors

Started by Stormkrow, 04 July 2012 - 05:14 AM
Stormkrow #1
Posted 04 July 2012 - 07:14 AM
Hi all,

I been playing around with rs.getBundledOutput and cant for the life of me get it working.
What i wanna do is connect a PC with bundled cable and have it detect the state or condition of other colored cables whether they are on or not?

I dont need a whole bunch of code but just an idea of how the rs.getBundledOutput works/is used or if im even using the correct command.
Thanks :P/>/>
Luanub #2
Posted 04 July 2012 - 09:48 AM
You want to use rs.testBundledInput() for this instead of getBundledOutput. It will return true if on for the listed color or false if it is off.

Example:

if rs.testBundledInput("right", colors.red) then
print ("Red is on")
else
print ("Red is off")
end
Stormkrow #3
Posted 04 July 2012 - 09:51 AM
Thanks it works like a bomb :P/>/>