Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function measure()
- local d = 0
- while not turtle.detect() do
- if turtle.forward() then
- d = d + 1
- end
- end
- return d
- end
- local distance = measure()
- turtle.turnRight()
- turtle.turnRight()
- for m = 1,distance do
- turtle.forward()
- end
- print(distance.." meters.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement