SHOW:
|
|
- or go back to the newest paste.
| 1 | local i=0 | |
| 2 | - | if redstone.getAnalogInput("back") > 13 then
|
| 2 | + | local working=false |
| 3 | - | redstone.setOutput("left", true)
|
| 3 | + | |
| 4 | - | write ("Charged, turning off")
|
| 4 | + | |
| 5 | - | end |
| 5 | + | i=0 |
| 6 | - | if redstone.getAnalogInput("back") < 14 then
|
| 6 | + | if redstone.getInput("top") == true and working==false then
|
| 7 | - | redstone.setOutput("left", false)
|
| 7 | + | working=true |
| 8 | - | write("Not fullly charged, turning on")
|
| 8 | + | |
| 9 | - | end |
| 9 | + | for i=0, 50 do |
| 10 | redstone.setOutput("right",true)
| |
| 11 | - | sleep(10) |
| 11 | + | sleep(.25) |
| 12 | redstone.setOutput("right",false)
| |
| 13 | sleep(.025) | |
| 14 | end | |
| 15 | redstone.setOutput("right",false)
| |
| 16 | working=false | |
| 17 | end | |
| 18 | end |