Posted 03 September 2012 - 11:58 PM
I have a turtle perma-mining with this code:
and my receiving computer running:
but nothing happens when I broadcast the message, be it automatically by the turtle's code or with a command, so the receiver just hangs permanently. What am I doing wrong? The turtle is wireless and the receiver console has a modem, and the distance is short. I tried with rednet.send too and also pullEvent.
while true do
os.queueEvent("randomEvent")
os.pullEvent()
i = 1
shell.run("excavate","20")
shell.run("turn","right","2")
shell.run("go","up","1")
shell.run("go","forward","5")
rednet.broadcast("Mining Turtle Excavating Session Complete")
slot = 1
while slot < 10 do
turtle.select(slot)
turtle.drop()
slot = slot + 1
end
shell.run("turn","right","2")
shell.run("go","forward","5")
shell.run("go","down","1")
end
and my receiving computer running:
while true do
senderID, message, distance = rednet.receive()
mon = peripheral.wrap("left")
mon.print(message)
mon.print("ID & distance: ")
mon.write(senderID)
mon.write(", ")
mon.write(distance)
while s < 5 do
rs.setInput("bottom",true)
sleep(0.3)
rs.setInput("bottom",false)
sleep(0.1)
s = s + 1
end
end
but nothing happens when I broadcast the message, be it automatically by the turtle's code or with a command, so the receiver just hangs permanently. What am I doing wrong? The turtle is wireless and the receiver console has a modem, and the distance is short. I tried with rednet.send too and also pullEvent.