Advertisement
Guest User

startup

a guest
Mar 30th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement