MrDionesalvi

Sender Modem

Jun 22nd, 2021 (edited)
174
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --CFG Modem Sender lmlm
  2.  
  3.  
  4. local side = "top"
  5. local port = 722
  6. local replyPort = 723
  7. local filename = "text"
  8. local text = ""
  9.  
  10. local modem = peripheral.wrap(side)
  11.  
  12. if fs.exists(filename) == true then
  13.     h = fs.open(filename, "r")
  14.     text = h.readAll()
  15.     h.close()
  16. else
  17.     print("File does not exist, check path..")
  18. end
  19.  
  20. term.clear()
  21. print("Calafrica Group -- Calaofeng GT-3TP GT 3TP Mark III\n\n")
  22.  
  23.  
  24. while true do
  25.    
  26.     modem.transmit(port, replyPort, text)
  27.     os.sleep(5)
  28.  
  29.  
  30. end
RAW Paste Data