Posted 15 March 2018 - 12:55 AM
So just to preface this post, I'm super new to ComputerCraft (I started yesterday), so what you're about to see is probably something you'll look at and go "well right here it's wrong, obviously." Anyways, I'm trying to make a looped program that displays the current status of a machine that outputs a redstone signal when active and have that program only "run" if an "on/off" switch is also on. However, the status does not refresh when I tested the program using redstone torches. What do I have wrong?
local signal = rs.getInput("left")
local on_off = rs.getInput("right")
while on_off == true do
while signal ~= true do
print("The CGA is currently off.")
sleep(0.5)
term.clear()
term.setCursorPos(1,1)
end
while signal == true do
print("The CGA is currently on.")
sleep(0.5)
term.clear()
term.setCursorPos(1,1)
end
end