Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("top")
- mon.clear()
- rednet.open("back")
- mon.setTextColor(colors.purple)
- mon.setCursorPos(3,1)
- mon.write("***TERMINAL***")
- mon = s
- ----------------------------------------------------------------------------
- zmacknuto=false
- text="fermenter"
- s.setBackgroundColor(colors.red)
- s.setCursorPos(5,3)
- s.write(text)
- function klik(kx,ky)
- if ky==3 and ( kx > 4 and kx < 15) then
- print("zmena fermenter")
- zmacknuto = not zmacknuto
- if zmacknuto == true then
- s.setBackgroundColor(colors.green)
- rednet.send(244, "turtle1on")
- else
- s.setBackgroundColor(colors.red)
- rednet.send(244, "turtle1off")
- end
- s.setCursorPos(5,3)
- s.write(text)
- end
- end
- while true do
- s.clear()
- local e,s,x,y = os.pullEvent("monitor_touch")
- klik(x,y)
- print(x..":"..y)
- local 244, message, distance = rednet.receive()
- print(message)
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement