SHARE
TWEET

gate

a guest Jul 20th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("left")
  2. print("opened connection")
  3. rednet.send(12, "opengate001")
  4. id, message = rednet.receive()
  5. if id == 12 and message == "gaterec001" then
  6.  print("Opening gate")
  7.  elseif id == 12 and message == "gaterec002" then
  8.  print("Closing gate")
  9.  else
  10.  print("Error #1, no message received")
  11. end
  12. rednet.close("left")
  13. print("closed connection")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top