BeastmodeJD

RaceControl-yellow

Nov 19th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. green = false
  2. function eventF()
  3.     event, side, chan, reply, dist = os.pullEvent("modem_message")
  4.     print("tripped event")
  5.     green = true
  6. end
  7. function lights()
  8.     rs.setOutput("right", true)
  9.     sleep(1)
  10.     rs.setOutput("right", false)
  11.     rs.setOutput("left", true)
  12.     sleep(1)
  13.     rs.setOutput("left", false)
  14. end
  15. rs.setOutput("bottom", false)
  16. while not green do
  17.     parallel.waitForAny(eventF, lights)
  18. end
  19. rs.setOutput("right", false)
  20. rs.setOutput("left", false)
  21. rs.setOutput("bottom", true)
Add Comment
Please, Sign In to add comment