Guest User

startup

a guest
Mar 30th, 2020
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Lighting Controller (1)
  2. rednet.open("front")
  3. while true do
  4.   test, sendid, message = os.pullEvent("rednet_message")
  5.   if sendid == 28 then
  6.     if message == "light_on" then
  7.       rs.setOutput("right", true)
  8.       rednet.send(sendid,"on true")
  9.     end
  10.     if message == "light_off" then
  11.       rs.setOutput("right", false)
  12.       rednet.send(sendid,"off true")
  13.     end
  14.   end
  15. end
RAW Paste Data