View difference between Paste ID: 5ujgAhTa and XgfB74Rg
SHOW: | | - or go back to the newest paste.
1
redstone.setAnalogOutput("front",15)
2
while true do
3
    on = redstone.getAnalogInput("right")
4
    if on > 6 then
5
        redstone.setAnalogOutput("front",0)
6
    elseif on < 5 then
7
        redstone.setAnalogOutput("front",15)
8
    end
9
    sleep(0.1)
10
    print(on)
11
end