Last active
September 20, 2015 07:28
-
-
Save MyNameIsKodos/efeb848c66bf27ae0a59 to your computer and use it in GitHub Desktop.
Basic Drone control program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local component = require("component") | |
local event = require("event") | |
local m = component.modem | |
local args, options = shell.parse(...) | |
function testSend(a,b,c) | |
component.modem.broadcast(a,b,c) | |
local _,_,from,port,_,message = event.pull("modem_message") | |
return from,message | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local component = require("component") | |
local event = require("event") | |
local from = nil | |
local m = component.modem | |
m.open(1234) | |
while connected do | |
local _,_,from,port,_,pw,message = event.pull("modem_message") | |
if pw == "Herpderp" then | |
m.send(from,port,message) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment