Skip to content

Instantly share code, notes, and snippets.

@xarses
Last active April 18, 2017 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xarses/3b486081dd423a3947189c48faac0f97 to your computer and use it in GitHub Desktop.
Save xarses/3b486081dd423a3947189c48faac0f97 to your computer and use it in GitHub Desktop.
-- Listen --
modem = component.modem
modem.open(123)
function respond(event, localAddress, remoteAddress, port, distance, ...) print(table.unpack{...}) end
event.listen('modem_message', respond)
-- Send --
modem.broadcast(123, 'asdf', 'asdf', 'asdf')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment