Advertisement
toast_account_i_made

Untitled

Dec 17th, 2022 (edited)
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. os.loadAPI("json")
  2.  
  3. local monitor = peripheral.wrap("left")
  4.  
  5. function writeln(str)
  6. monitor.write(str)
  7. local x, y = monitor.getCursorPos()
  8. monitor.setCursorPos(1, y+1)
  9. end
  10.  
  11. while true do
  12. os.sleep(2.5)
  13. local request = http.get("http://e6fb-81-129-131-70.eu.ngrok.io/")
  14. local dat = json.decode(request.readAll())
  15. request.close()
  16.  
  17. monitor.clear()
  18. monitor.setCursorPos(1,1)
  19. monitor.setCursorBlink(true)
  20.  
  21. for i,v in ipairs(dat) do
  22. print(v)
  23. writeln(v)
  24. end
  25. end
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement