matheuscat12

TRC-c

Aug 17th, 2012
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. function c()
  2.   term.clear()
  3.   term.setCursorPos(1,1)
  4. end
  5.  
  6. c()
  7. print("Welcome to TRC 1.0 - Turtle Remote Control - Computer")
  8. print("------------------------------------------")
  9. print("This is a Rednet Works program")
  10. print("------------------------------")
  11. print("Usages")
  12. print("------")
  13. print("W = Front")
  14. print("S = Back")
  15. print("A = Left")
  16. print("D = Right")
  17. print("Q = Up")
  18. print("E = Down")
  19. print("--------")
  20. print("TRC started")
  21. print("-----------")
  22. write("Enter the modem side: ")
  23. mSide = read()
  24. write("Enter the turtle IDentification: ")
  25. tId = tonumber(read())
  26. print("---------------------------------")
  27. print("Please, run the Receiver program on the turtle")
  28. print("The default name is: TRC-t")
  29. print("When you runned the program, control your turtle")
  30. print("(CTRL-T to terminate)")
  31. print("------------------------------------------------")
  32.  
  33. function send()
  34. write("Enter the command: ")
  35. cmd = read()
  36. rednet.open(mSide)
  37. rednet.send(tId, cmd)
  38. print("Sucessfully sended")
  39. send()
  40. end
  41.  
  42. send()
Add Comment
Please, Sign In to add comment