Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local state
- local mon = peripheral.wrap("right")
- while 1 do
- local door_handle = http.get("http://fellouttheworld.bl.ee/door/door.php")
- mon.clear()
- mon.setCursorPos(1,1)
- if not door_handle then
- mon.write("Impossible de se connecter")
- else
- state = door_handle.readAll()
- if state == "0" then
- rs.setOutput("back",false)
- mon.write("Porte fermer")
- mon.setCursorPos(1,2)
- mon.write(state)
- else
- rs.setOutput("back",true)
- mon.write("Porte ouverte")
- mon.setCursorPos(1,2)
- mon.write(state)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement