Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("top")
- vorgabe = {}
- mon.setBackgroundColor(colors.white)
- mon.clear()
- for i=1, 4 do
- mon.setTextColor(colors.green)
- mon.setCursorPos(i*2-1, 3)
- mon.write(i)
- end
- while true do
- for i=1,4 do
- event, side, x, y = os.pullEvent("monitor_touch")
- if(event) then
- mon.setCursorPos(i*2-1, 4)
- mon.setTextColor(colors.gray)
- mon.write("*")
- end
- vorgabe[i] = x
- if(vorgabe[1]==1 and vorgabe[2] ==7 and vorgabe[3]==3 and vorgabe[4]==5) then
- rs.setOutput("right", true)
- sleep(1)
- rs.setOutput("right", false)
- end
- end
- sleep(0.25)
- mon.clearLine()
- vorgabe = {}
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement