Jump to content




[Question] Detecting Redpower Cable Colors


  • You cannot reply to this topic
2 replies to this topic

#1 Stormkrow

  • Members
  • 50 posts
  • LocationSouth Africa

Posted 04 July 2012 - 06: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/>

#2 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 04 July 2012 - 08: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


#3 Stormkrow

  • Members
  • 50 posts
  • LocationSouth Africa

Posted 04 July 2012 - 08:51 AM

Thanks it works like a bomb :P/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users