Posted 11 December 2012 - 11:33 AM
Hello, I'm pretty new to CC so please bear with me. I've followed various tutorials and video's to help better explain to me how to output something when the computer detects an input from a specific color on a bundled cable. If someone would take some time to explain where i may be going wrong with this i'd really appreciate it.
What i'm hoping to do is to display a status message on the connected monitor for various colored inputs
Sorry it's a little messy.
Edit: Solved,
changing the second value instead of the first on the position. Simple mistake, sorry guys.
What i'm hoping to do is to display a status message on the connected monitor for various colored inputs
Sorry it's a little messy.
while true do
os.pullEvent("redstone")
if (colors.test(redstone.getBundledInput("left"), colours.white)) then
mon = peripheral.wrap("top")
mon.setCursorPos(1,1)
mon.write("White ON")
else
mon = peripheral.wrap("top")
mon.setCursorPos(1,1)
mon.write("White OFF")
end
if (colors.test(redstone.getBundledInput("left"), colours.orange)) then
mon = peripheral.wrap("top")
mon.setCursorPos(2,1)
mon.write("Orange ON")
else
mon = peripheral.wrap("top")
mon.setCursorPos(2,1)
mon.write("Orange OFF")
end
if (colors.test(redstone.getBundledInput("left"), colours.magenta)) then
mon = peripheral.wrap("top")
mon.setCursorPos(3,1)
monitor.clear
mon.write("Magenta ON")
else
mon = peripheral.wrap("top")
mon.setCursorPos(3,1)
mon.write("Magenta OFF")
end
end
Edit: Solved,
mon.setCursorPos(1,2)
changing the second value instead of the first on the position. Simple mistake, sorry guys.