Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("front")
- mon.clear()
- mon.setTextScale(1.0)
- mon.setCursorPos(2,1)
- mon.write("Licht")
- while true do
- event,side,x,y = os.pullEvent("monitor_touch")
- elseif x > 1 and x < 6 and y == 1 and rs.getOutput("top") == false then
- rs.setOutput("top",true)
- mon.setCursorPos(2,1)
- mon.clearLine()
- mon.blit("Licht = OFF","0000000000000","ddddddddddddd")
- elseif x > 1 and x < 6 and y == 1 and rs.getOutput("top") == true then
- rs.setOutput("top",false)
- mon.setCursorPos(2,1)
- mon.clearLine()
- mon.blit("Licht = ON","000000000000","eeeeeeeeeeee")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement