Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sensor = peripheral.wrap('right')
- local isMoving
- local isStart = true
- local isEnd
- --0.0, y=-3.0, z=1.0
- function init()
- -- Debug
- shell.run('rm output')
- local output = fs.open('output', 'w')
- output.write(sensor.sonicScan())
- output.close()
- shell.run('pastebin put output')
- end
- function moveToEgg()
- isMoving = true
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- isMoving = false
- isStart = false
- isEnd = true
- end
- function returnToBase()
- isMoving = true
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.down()
- isMoving = false
- isEnd = false
- isStart = true
- end
- init()
Add Comment
Please, Sign In to add comment