Craft4Cube

Untitled

Jul 3rd, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. local modem = peripheral.wrap("top")
  2. modem.open(9999);
  3. print("Ready.9999")
  4. while true do
  5. local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  6. print(message)
  7. if message == 1 then
  8. rs.setOutput("left", true)
  9. os.sleep(0.2)
  10. rs.setOutput("left", false)
  11. end
  12. if message == 2 then
  13. rs.setOutput("back", true)
  14. os.sleep(0.2)
  15. rs.setOutput("back", false)
  16. end
  17. if message == 3 then
  18. rs.setOutput("right", true)
  19. os.sleep(0.2)
  20. rs.setOutput("right", false)
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment