wwjd23wjd

Calibrate

Nov 26th, 2020 (edited)
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. rednet.open("back")
  2.  
  3. local xPos, yPos, zPos = gps.locate()
  4.  
  5. function updateLocation()
  6. GPS = {}
  7. local x,y,z = gps.locate()
  8. GPS.x = x
  9. GPS.y = y
  10. GPS.z = z
  11. rednet.broadcast(GPS)
  12. end
  13.  
  14. function calibrate() --updates your gps position
  15. while true do
  16. updateLocation()
  17. os.sleep(5)
  18. end
  19. end
  20.  
  21.  
  22. textutils.slowPrint("calibrating....")
  23. calibrate()
  24.  
Advertisement
Add Comment
Please, Sign In to add comment