Posted 20 September 2012 - 05:11 PM
Hello pros.
I can't seem to figure out how to send values over rednet. I can make my Mining turtle remotely dig, but I want it to report his progress on my main screen inside my house.
But the progress bar on screen stays 0.
And if there is a way, could you tell me how to make text appear on screen and on terminal on same time.
Here is the code for my Turtle.
Here is the code for monitor that is collecting the info.
I can't seem to figure out how to send values over rednet. I can make my Mining turtle remotely dig, but I want it to report his progress on my main screen inside my house.
But the progress bar on screen stays 0.
And if there is a way, could you tell me how to make text appear on screen and on terminal on same time.
Here is the code for my Turtle.
y = 1
rednet.open("right")
x = os.computerID()
print("Your Turtle ID is "..x.."")
rednet.receive(nil)
turtle.forward()
for i=1,50 do
turtle.digDown()
turtle.down()
y = y+1
rednet.send(1,"..y..")
end
for o=1,50 do
turtle.up()
y = y+1
rednet.send(1,"..y..")
end
turtle.back()
Here is the code for monitor that is collecting the info.
function start()
l = l-1
mon.clear()
rednet.open("back")
rednet.send(3)
while y < 10 do
mon.setCursorPos(1,1)
print("+--------------------------------------------+")
print(": : Mining :")
print(": : Progress:"..y.." :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print("+--------------------------------------------+")
mon.setCursorPos(1,1)
sleep(1)
y = rednet.receive(1)
mon.clear()
end
while y > 10 do
mon.clear()
print("+--------------------------------------------+")
print(": : Mining :")
print(": : Progress:"..y.." :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print(": : :")
print("+--------------------------------------------+")
mon.setCursorPos(1,1)
mon.clear()
sleep(1)
y = rednet.receive(1)
mon.clear()
end
end