Advertisement
SavageCore

Turtle GPS

May 15th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. rednet.open("left")
  2. local senderId, message, distance = rednet.receive() -- wait for message
  3. local x, y, z = gps.locate(5)
  4. if x ~= nil then
  5.   locationString = x .. "|" .. y .. "|" .. z
  6.   rednet.send(senderId,locationString, true)
  7. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement