Advertisement
Guest User

test.lua

a guest
Mar 29th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. component = require("component")
  2. sides = require("sides")
  3.  
  4. detector = component.ir_augment_detector
  5. rs0 = component.proxy("3a112aa8-0e18-4bb1-b4d3-7fddd67d1d86")
  6. rs1 = component.proxy("40ae1e87-a48f-4fdc-a7b9-3c8fa331ad6a")
  7.  
  8. while true do
  9.   local tag = detector.getTag()
  10.   if tag == "Ligne1" then
  11.     rs0.setOutput(sides.top, 1)
  12.     rs1.setOutput(sides.top, 0)
  13.     os.sleep(5)
  14.   elseif tag == "Ligne2" then
  15.     rs0.setOutput(sides.top, 0)
  16.     rs1.setOutput(sides.top, 0)
  17.     os.sleep(5)
  18.   elseif tag == "Ligne3" then
  19.     rs0.setOutput(sides.top, 0)
  20.     rs1.setOutput(sides.top, 1)
  21.     os.sleep(5)
  22.   else
  23.     os.sleep(0.5)
  24.   end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement