Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local sides = require("sides")
- local shell = require("shell")
- local colors = require("colors")
- local term = require("term")
- local computer = require("computer")
- rs = component.redstone
- function colorOn(color)
- rs.setBundledOutput(sides.front, color, 255)
- end
- function colorOff(color)
- rs.setBundledOutput(sides.front, color, 0)
- end
- function turnOn(name)
- colorOn(outputs[name])
- end
- function turnOff(name)
- colorOff(outputs[name])
- end
- outputs = {main=colors.magenta, backup=colors.orange, error=colors.lightblue, interconnect=colors.white}
- function allOff()
- for i,color in pairs(outputs) do
- colorOff(color)
- end
- end
- function aeStartup()
- term.clear()
- print("Starting up")
- os.sleep(1)
- print("AE1 Main power: On")
- turnOn("main")
- os.sleep(0.5)
- print("AE2 Backup power: On")
- turnOn("backup")
- os.sleep(5)
- print("AE1 - AE2 Power interconnect: on")
- turnOn("interconnect")
- os.sleep(2)
- print("AE2 Backup power: Off")
- turnOff("backup")
- os.sleep(1)
- turnOff("error")
- end
- allOff()
- turnOn("error")
- while true do
- os.sleep(0.1)
- term.clear()
- print("Control Menu")
- print("1: Start")
- print("2: Stop")
- print("9: Exit")
- input = io.read()
- if input == "1" then
- aeStartup()
- end
- if input == "2" then
- allOff()
- turnOn("error")
- end
- if input == "9" then
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement