Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("json")
- local monitor = peripheral.wrap("left")
- function writeln(str)
- monitor.write(str)
- local x, y = monitor.getCursorPos()
- monitor.setCursorPos(1, y+1)
- end
- while true do
- os.sleep(2.5)
- local request = http.get("http://e6fb-81-129-131-70.eu.ngrok.io/")
- local dat = json.decode(request.readAll())
- request.close()
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.setCursorBlink(true)
- for i,v in ipairs(dat) do
- print(v)
- writeln(v)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement