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