Advertisement
paramus

Home Cinema

Mar 4th, 2025
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | Gaming | 0 0
  1. local Server = ""
  2.  
  3. function DrawFrame()
  4.     local Request = http.get(Server .. "/NextFrame") --TODO: Should all the frames be played or just some?
  5.     local image = paintutils.parseImage(Request.readAll())
  6.     paintutils.drawImage(image, term.getCursorPos())
  7.    
  8.     Request = http.get(Server .. "/GetAudio") --TODO: Should all the frames be played or just some?
  9.     speaker.playAudio(Request.readAll())
  10. end
  11.  
  12. -- Main --
  13. local monitor = peripheral.find("monitor")
  14. local Speaker = peripheral.find("speaker")
  15. term.redirect(monitor)
  16. local x,y = term.getSize()
  17.  
  18. while(true) do
  19.     DrawFrame()
  20.     sleep(0.1)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement