Advertisement
Incomprehensible

modem testing sender

Apr 4th, 2025 (edited)
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local monitor = peripheral.find("monitor")
  2. local modem = peripheral.find("modem", rednet.open) -- doing it like this finds all modem peripherals and then opens rednet on them
  3.  
  4. --- MAIN
  5. monitor.clear()
  6. monitor.setCursorPos(1,1)
  7. monitor.setTextScale(0.5)
  8. monitor.write("Hello, ID: " .. os.computerID()) --the id of the computer
  9.  
  10. rednet.send(3, "Hello from rednet!")
  11.  
  12. function update()
  13.  
  14. end
  15.  
  16. while true do
  17.     sleep(0.5)
  18.     --update()
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement