Advertisement
karelvysinka

GPS Turtle

Jan 25th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. -- zjisti aktuální souradnice
  2. local x,y,z = gps.locate(5, debug)
  3. if not x then --If gps.locate didn't work, it won't return anything. So check to see if it did.
  4.    print("Failed to get my location!")
  5. else
  6. --This prints 'I am at (1, 2, 3)' or whatever your coordinates are
  7.    print("I am at (" .. x .. ", " .. y .. ", " .. z .. ")")
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement