Advertisement
jimthenerd1999

Untitled

Jul 2nd, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("left");
  2. print("Elevator Control Client v0.3 ")
  3. print("------------------------------------")
  4. print("Use your rednet device to control")
  5. print(" -- 'UP' to move up")
  6. print(" -- 'DOWN' to move down")
  7. print(" -- 'UPDATE' to perform firmware update")
  8. print("")
  9.  
  10.  
  11. while true do
  12. id, command = rednet.receive()
  13.  
  14. if (command == "UP") then
  15. turtle.up()
  16. end
  17. if (command == "DOWN") then
  18. turtle.down()
  19. end
  20. if (command == "UPDATE") then
  21. id, link = rednet.receive()
  22. print ("Updating firmware....")
  23. sleep(5)
  24.  
  25. shell.run("delete startup");
  26. shell.run("pastebin get " .. link .. " startup")
  27.  
  28. print("Update DONE.")
  29. sleep(2)
  30. os.reboot()
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement