Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local medirModule = {}
- function medirModule.measureDistance() {
- print("Colocar placa com comprimento no final? (s/n)")
- placeSign = read()
- count = 0
- qtd = 0
- while turtle.forward() do
- count = count + 1
- end
- qtd = count + 1
- turtle.turnLeft()
- turtle.turnLeft()
- while count > 0 do
- if turtle.forward() then
- count = count - 1
- end
- end
- if (placeSign == 's') then
- turtle.place("Comprimento: " .. qtd)
- end
- print("Comprimento: " .. qtd)
- end
- return medirModule
Add Comment
Please, Sign In to add comment