Advertisement
Telerabi

smarthome TürModul

Jul 9th, 2019
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. rednet.open("bottom")
  2. p = 1
  3.  
  4. while true do
  5.     id, message = rednet.receive()
  6.     if message == "TürImmer" then
  7.         p = p + 1
  8.         if p % 2 == 0 then
  9.             rs.setOutput("top", true)
  10.         else
  11.             rs.setOutput("top", false)
  12.         end
  13.     elseif message == "Tür3sek" then
  14.         rs.setOutput("top", true)
  15.         sleep(3)
  16.         rs.setOutput("top", false)
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement