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 :
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)
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)