Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- dis=0
- while true do
- dis=dis+1
- if robot.forward() == nil then
- for i=1,dis-1 do
- robot.back()
- end
- print("Измеренное расстояние: ", dis-1, " блока(ов).")
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement