Skip to content

Instantly share code, notes, and snippets.

@wolfgangmeyers
Last active August 29, 2015 14:17
Show Gist options
  • Save wolfgangmeyers/ccd3141774bcda0a6b69 to your computer and use it in GitHub Desktop.
Save wolfgangmeyers/ccd3141774bcda0a6b69 to your computer and use it in GitHub Desktop.
Computercraft script - client to control turtle
running = true
modem = peripheral.wrap("back")
modem.open(1)
while true do
io.write(">")
command = io.read()
modem.transmit(0, 1, command)
local event, modemSide, senderChannel,
replyChannel, message, senderDistance = os.pullEvent("modem_message")
print(message)
if command == "quit" then
break
end
end
running = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment