Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- mon = peripheral.wrap("top")
- mon.clear()
- mon.setTextScale(2)
- ctrl = sensors.getController()
- data = sensors.getSensors(ctrl)
- reactorSensor = data[1]
- data = sensors.getSensorInfo(ctrl,reactorSensor)
- sensors.setSensorRange(ctrl,reactorSensor,"5")
- data = sensors.getProbes(ctrl,reactorSensor)
- eustorageProbe = data[3]
- data = sensors.getAvailableTargetsforProbe(ctrl,reactorSensor,eustorageProbe)
- print("")
- local cursorY = 2
- print(#data)
- for k,v in pairs(data) do
- mfsuTarget = data[k]
- if mfsuTarget then
- if string.find(mfsuTarget,"MFSU") then
- print(k.." MFSU")
- sensors.setTarget(ctrl,reactorSensor,mfsuTarget)
- data = sensors.getSensorReadingAsDict(ctrl,reactorSensor,mfsuTarget,eustorageProbe)
- for k,v in pairs(data) do
- print(v)
- end
- end
- end
- end
- --[[
- for k,v in pairs(data) do
- mfsuTarget = data[k]
- if mfsuTarget then
- if string.find(mfsuTarget,"MFSU") then
- print("1MFSU "..k)
- sensors.setTarget(ctrl,reactorSensor,mfsuTarget)
- print("2MFSU "..k)
- data = sensors.getSensorReadingAsDict(ctrl,reactorSensor,mfsuTarget,eustorageProbe)
- print("3MFSU "..k)
- mon.setCursorPos(1, cursorY)
- print("4MFSU "..k)
- mon.write("MFSU EU:"..data.energy)
- print("5MFSU "..k)
- mon.setCursorPos(1, cursorY+1)
- print("6MFSU "..k)
- mon.write("MFSU Out:"..data.output)
- print("7MFSU "..k)
- print("8MFSU EU:"..data.energy)
- print("9MFSU "..k)
- print("10MFSU Out:"..data.output)
- print("11MFSU "..k)
- cursorY = cursorY + 2
- end
- end
- end
- ]]--
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement