Advertisement
GravityCube

MultiMon Display

Jul 11th, 2019
257
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("gcapi")
  2. os.loadAPI("multiMon")
  3.  
  4. local monitorSetup = {{},{},{}}
  5. local monitors = {}
  6. for k,v in pairs(peripheral.getNames()) do
  7. if peripheral.getType(v) == "monitor" then
  8. table.insert(monitors, peripheral.wrap(v))
  9. end
  10. end
  11. table.sort(monitors)
  12. for k,v in pairs(monitors) do
  13. if k == 1 then k = 2 end
  14. table.insert(monitorSetup[((k%3)+1)], v)
  15. end
  16. local disp = multiMon.create('myMonitor', monitorSetup)
  17.  
  18. while true do
  19. write("Enter the url: ")
  20. gcapi.printImageFromURL(gcapi.split(read()," ")[1], disp, true)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement