Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wired = peripheral.wrap("back")
- local wireless = peripheral.wrap("right")
- local mfsu_one = peripheral.wrap("mfsu_1")
- local mfsu_two = peripheral.wrap("mfsu_2")
- local euStoredTotal, capacityTotal
- local relayID = 18
- function OpenWireless()
- rednet.open("right")
- rednet.close("back")
- end
- function OpenWired()
- rednet.open("back")
- rednet.close("right")
- end
- function SendToRelay(msg)
- rednet.send(relayID, msg)
- end
- function MainLoop()
- while true do
- sleep(1)
- OpenWired()
- euStoredTotal = mfsu_one.getEUStored() + mfsu_two.getEUStored()
- capacityTotal = mfsu_one.getEUCapacity() + mfsu_two.getEUCapacity()
- OpenWireless()
- SendToRelay("<eustored>" .. euStoredTotal)
- SendToRelay("<eucapacity>" .. capacityTotal)
- end
- end
- MainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement