Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nSlaveID = 26
- local nTimeout = 30
- local bCool = true
- yourmonitor = peripheral.wrap("top")
- term.redirect(yourmonitor)
- term.clear()
- term.setCursorPos(1,1)
- print("**************")
- print("* Welcome *")
- print("**************")
- print("")
- print("Enabling network, connecting to HarvestBot 01")
- rednet.open("back")
- print("Network enabled. Receiving...")
- local time
- while bCool == true do
- local id,msg,foo = rednet.receive(nTimeout)
- if id == nil then
- print("Timeout")
- bCool = false
- elseif id == nSlaveID then
- time = os.time()
- time = textutils.formatTime(time, true)
- print(time.." - "..msg)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment