Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wantedSteam = 4000
- -- pick mode
- -- max power mode
- -- aim for 1800 rpm, or steam output of turbines * 2000mb
- -- buffer full mode(later)
- -- Find info about connect devices
- -- turbines
- -- reactors
- -- control loop
- -- first stage
- -- Aim for a fixed amount of steam
- local IPart = 0.0
- while true do
- print("Hello World!")
- local reactor = peripheral.wrap('BigReactors-Reactor_0')
- print(reactor)
- local CurrentSteam = reactor.getHotFluidProducedLastTick()
- print(CurrentSteam)
- steamError = wantedSteam - CurrentSteam --
- print(steamError)
- print(IPart)
- temp = IPart
- IPart = steamError * 0.01 + temp
- output = IPart
- output = (output * -1) -- -1 max/ 0 min
- output = output + 1 -- 0 max / 1 min
- reactor.setAllControlRodLevels(output)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement