Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CmdDCore
- -- DEBUG
- DEBUG = true
- if DEBUG then
- print("[DEBUG] Start of cmdCore")
- end
- rednetHostname = "cmdCore"
- rednet.open("bottom")
- rednetProtocol = "core"
- rednetTimeout = 40
- rednet.host(rednetProtocol,rednetHostname)
- hostnameComp = "compCore"
- core = peripheral.wrap("top")
- function GetInfo()
- if DEBUG then
- print("[DEBUG] Start of GetInfo")
- end
- v = {}
- v[1] = core.getEnergyStored()
- v[2] = core.getMaxEnergyStored()
- v[3] = core.getTransferPerTick()
- SendInfo(v)
- end
- function SendInfo(pV)
- if DEBUG then
- print("[DEBUG] Start of SendInfo pV = ",pV)
- end
- rednet.broadcast(pV,rednetProtocol)
- end
- while true do
- GetInfo()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement