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

ProjectRed cable color detection problem

Started by xfactores, 11 November 2017 - 10:35 AM
xfactores #1
Posted 11 November 2017 - 11:35 AM
I want to detect an input from a projectred white and black wire inside a bundled cable and send a rednet message to an another computer. If I power the white cable it detect it and do what it needs to do but if I power the black cable it do the same thing as the white cable. Here is the code :


local modem = peripheral.wrap("top")
modem.open(1)
rednet.open("top")

while true do
os.pullEvent("redstone")
if rs.getBundledInput("left", colors.black) then
print("a")elseif
rs.getBundledInput("left", colors.white) then
print("b") else
break
end
end


I've shorten up the code here to just write a or b on the screen because the another computer is far away from the one that detect the input.
Can someone help me, I'm really lost here D:

(and sorry if my english is not really good, i'm french :3)
KingofGamesYami #2
Posted 11 November 2017 - 03:11 PM
getBundledInput does not accept a second argument.

I think you meant to use testBundledInput.