Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Loads the API, straightforward
- os.loadAPI("touchpoint")
- os.loadAPI("/rom/apis/rednet")
- rednet.open("bottom")
- --Get monitor
- m = peripheral.wrap("monitor_0")
- --computers that can send wireless signals
- local rc1 = rednet.lookup("rctrl","rc1")
- local rc2 = rednet.lookup("rctrl","rc2")
- local rc3 = rednet.lookup("rctrl","rc3")
- local rc4 = rednet.lookup("rctrl","rc4")
- local rc5 = rednet.lookup("rctrl","rc5")
- local rc6 = rednet.lookup("rctrl","rc6")
- --computers that are under the reactors
- local rs1 = rednet.lookup("rctrl","rs1")
- local rs2 = rednet.lookup("rctrl","rs2")
- local rs3 = rednet.lookup("rctrl","rs3")
- local rs4 = rednet.lookup("rctrl","rs4")
- local rs5 = rednet.lookup("rctrl","rs5")
- local rs6 = rednet.lookup("rctrl","rs6")
- --stuff connected to the reactors
- local r1fp = "reactor_fluid_port_1"
- local r2fp = "reactor_fluid_port_2"
- local r3fp = "reactor_fluid_port_4"
- local r4fp = "reactor_fluid_port_5"
- local r6fp = "reactor_fluid_port_6"
- local r1h = "nuclear_reactor_1"
- local r2h = "nuclear_reactor_2"
- local r3h = "nuclear_reactor_4"
- local r4h = "nuclear_reactor_5"
- local r6h = "nuclear_reactor_6"
- function warmup()
- m.clear()
- m.setCursorPos(1,1)
- m.setTextScale(1)
- m.write("warming up")
- m.setCursorPos(1,2)
- m.write("waiting 10 seconds for all computers and peripherals to wake up")
- y=3
- for i=1,10 do
- m.setCursorPos(1,y)
- m.write("Sleeping 10 seconds: "..i)
- sleep(1)
- y=y+1
- end
- m.setCursorPos(1,y)
- m.write("All Done")
- m.clear()
- m.setCursorPos(1,1)
- m.write("Checking all devices")
- m.setCursorPos(1,2)
- m.write("Reactor 1 Fluidport :")
- m.write(peripheral.isPresent("reactor_fluid_port_1"))
- m.setCursorPos(1,3)
- m.write("Reactor 2 Fluidport :")
- m.write(peripheral.isPresent("reactor_fluid_port_2"))
- m.setCursorPos(1,4)
- m.write("Reactor 3 Fluidport :")
- m.write(peripheral.isPresent("reactor_fluid_port_3"))
- m.setCursorPos(1,5)
- m.write("Reactor 4 Fluidport :")
- m.write(peripheral.isPresent("reactor_fluid_port_4"))
- m.setCursorPos(1,6)
- m.write("Reactor 5 Fluidport :")
- m.write(peripheral.isPresent("reactor_fluid_port_5"))
- m.setCursorPos(1,7)
- m.write("Reactor 6 Fluidport :")
- m.write(peripheral.isPresent("reactor_fluid_port_6"))
- end
- warmup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement