SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local turbine1 |
| 1 | + | local turbine |
| 2 | - | local reactor1 |
| 2 | + | local reactor |
| 3 | - | local monitor |
| 3 | + | turbine = peripheral.wrap("left")
|
| 4 | reactor = peripheral.wrap("BigReactors-Reactor_1")
| |
| 5 | - | monitor = peripheral.wrap("right")
|
| 5 | + | |
| 6 | function wipeScreen() | |
| 7 | term.clear() | |
| 8 | - | rednet.open("back")
|
| 8 | + | term.setCursorPos(1, 1) |
| 9 | - | message = rednet.receive() |
| 9 | + | end |
| 10 | - | monitor.write(..message..) |
| 10 | + | |
| 11 | - | sleep(10) |
| 11 | + | |
| 12 | - | monitor.clear() |
| 12 | + | sleep(0) |
| 13 | - | end |
| 13 | + | --Turbine Info |
| 14 | turbine1capacitor = turbine.getEnergyStored() | |
| 15 | turbine1rpm = turbine.getRotorSpeed() | |
| 16 | turbine1RFT = turbine.getEnergyProducedLastTick() | |
| 17 | turbine1Flow = turbine.getFluidFlowRate() | |
| 18 | --Reactor Info | |
| 19 | reactor1Temp = reactor.getFuelTemperature() | |
| 20 | reactor1Steam = reactor.getEnergyProducedLastTick() | |
| 21 | reactor1Fuel = reactor.getFuelConsumedLastTick() | |
| 22 | --make table of info | |
| 23 | t = {}
| |
| 24 | t["bank"] = bank1 | |
| 25 | t["turbine1capacitor"] = turbine.getEnergyStored() | |
| 26 | t["turbine1rpm"] = turbine.getRotorSpeed() | |
| 27 | t["turbine1RFT"] = turbine.getEnergyProducedLastTick() | |
| 28 | t["turbine1Flow"] = turbine.getFluidFlowRate() | |
| 29 | t["reactor1Temp"] = reactor.getFuelTemperature() | |
| 30 | t["reactor1Steam"] = reactor.getEnergyProducedLastTick() | |
| 31 | t["reactor1Fuel"] = reactor.getFuelConsumedLastTick() | |
| 32 | sleep(1) | |
| 33 | rednet.open("bottom")
| |
| 34 | rednet.broadcast(t) | |
| 35 | ||
| 36 | wipeScreen() | |
| 37 | print('Reactor - Turbine Monitor')
| |
| 38 | term.setCursorPos(1,2) | |
| 39 | print('Data Broadcast Live')
| |
| 40 | term.setCursorPos(1,3) | |
| 41 | print('System Status')
| |
| 42 | term.setCursorPos(1,4) | |
| 43 | print('Turbine:')
| |
| 44 | term.setCursorPos(1,5) | |
| 45 | print('RPM: '..turbine.getRotorSpeed()..'')
| |
| 46 | term.setCursorPos(1,6) | |
| 47 | print('Flow Rate: '..turbine.getFluidFlowRate()..'mb/t')
| |
| 48 | term.setCursorPos(1,7) | |
| 49 | print('Generation: '..turbine.getEnergyProducedLastTick()..' rf/t')
| |
| 50 | term.setCursorPos(1,8) | |
| 51 | print('Capacitor: '..turbine.getEnergyStored()..'')
| |
| 52 | term.setCursorPos(1,10) | |
| 53 | print('Reactor:')
| |
| 54 | term.setCursorPos(1,11) | |
| 55 | print('Temp: '..reactor.getFuelTemperature()..'')
| |
| 56 | term.setCursorPos(1,12) | |
| 57 | print('Steam Pressure: '..reactor.getEnergyProducedLastTick()..'')
| |
| 58 | term.setCursorPos(1,13) | |
| 59 | print('Fuel Consumption: '..reactor.getFuelConsumedLastTick()..'')
| |
| 60 | end |