SHOW:
|
|
- or go back to the newest paste.
| 1 | function frameMove() | |
| 2 | pulse("left")
| |
| 3 | - | shell.run("cycle")
|
| 3 | + | pulse("back")
|
| 4 | end | |
| 5 | ||
| 6 | function pulse(side) | |
| 7 | redstone.setOutput(side, true) | |
| 8 | sleep(0.4) | |
| 9 | redstone.setOutput(side, false) | |
| 10 | sleep(0.4) | |
| 11 | end | |
| 12 | ||
| 13 | function dig() | |
| 14 | rednet.open("right")
| |
| 15 | for i = 1, 8 do | |
| 16 | rednet.send(i, "cycle") | |
| 17 | end | |
| 18 | end | |
| 19 | ||
| 20 | function cycle() | |
| 21 | frameMove() | |
| 22 | dig() | |
| 23 | sleep(22) | |
| 24 | end | |
| 25 | ||
| 26 | while true do | |
| 27 | if redstone.getInput("top") == true then
| |
| 28 | cycle() | |
| 29 | end | |
| 30 | sleep(2) | |
| 31 | end |