Skip to content

Instantly share code, notes, and snippets.

@croxis
Last active December 15, 2015 21:29
Show Gist options
  • Save croxis/5326572 to your computer and use it in GitHub Desktop.
Save croxis/5326572 to your computer and use it in GitHub Desktop.
--[[
computer_0 mission control
monitor_1 monitor
computer_2 force field generator
MISSION CONTROL
--]]
--[[monitor = peripheral.wrap('left')
monitor.callRemote("monitor_1", "clear")
monitor.callRemote("monitor_1", "setTextScale", 5)
monitor.callRemote("monitor_1", "write", "Test")--]]
monitor = peripheral.wrap('monitor_1')
monitor.clear()
monitor.setTextScale(5)
monitor.setCursorPos(1,2)
monitor.write("test")
width, height = monitor.getSize()
modem = peripheral.wrap('left')
function printScreen(message)
monitor.clear()
monitor.setTextScale(5)
monitor.setCursorPos(width/2-2,2)
monitor.write(message)
end
seconds = -30
while seconds <= 15 do
printScreen("T " .. tostring(seconds))
if seconds == -14 then
modem.transmit(1926, 1, 'launch-shield')
end
seconds = seconds + 1
os.sleep(1)
end
modem.transmit(1926, 1, 'disable-shield')
printScreen("Launch completed")
--[[while true do:
poll for start signal
begin countdown at 30 seconds
fire forcefield and siren signal at 15 seconds
modem.transmit(1926,1,'launch-shield')
disable systems at + 15 seconds
modem.transmit(1926,1,'disable-shield')
--]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment