Jump to content

Recommended Posts

Posted

rednet.open("left")

while true do

shell.run("clear")

if rs.getInput ("back") then

      rednet.broadcast("engines on")

else

    rednet.broadcast("engines off")

end

os.pullEvent("redstone")

end

I want it to repeatedly send the correct message, instead of just sending it once when the red-stone is updated.

Posted

I could just use this

rednet.open("left")

while true do

shell.run("clear")

if rs.getInput ("back") then

      rednet.broadcast("engines on")

      shell.run("reboot")

else

    rednet.broadcast("engines off")

    shell.run("reboot")

end

os.pullEvent("redstone")

end

But sometimes there is a large delay before the message is updated. I need something more reliable.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...