Advertisement
AlexCatze2005

stem_broadcast.lua

Feb 24th, 2021 (edited)
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local stem = require("stem")
  2. local modem = require("component").modem
  3. local next = require("uuid").next
  4. local uuid
  5.  
  6. local server = stem.connect('stem.fomalhaut.me')
  7.  
  8. while true do
  9.   uuid = next()
  10.   server:send('stem-test', uuid)
  11.   os.sleep(2)
  12.   modem.broadcast(666,uuid)
  13.   os.sleep(2)
  14.   print("Отправлено :"..uuid)
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement