Advertisement
Guest User

iris

a guest
Jan 26th, 2020
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. --
  2. --   Iris control
  3. --
  4. --   Usage:
  5. --      iris
  6. --         Display iris state
  7. --      iris open
  8. --      iris close
  9. --
  10.  
  11.  
  12. sg = peripheral.wrap("right")
  13. args = {...}
  14.  
  15. function main()
  16.   if #args == 0 then
  17.     print(sg.irisState())
  18.   elseif args[1] == "open" then
  19.     sg.openIris()
  20.   elseif args[1] == "close" then
  21.     sg.closeIris()
  22.   else
  23.     print(args[1] .. " not understood")
  24.  
  25.   end
  26. end
  27.  
  28. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement