Posted 09 December 2012 - 06:25 AM
I am trying to make a program, that sends wireless commands to a turtle. The idea is that he moves MoveX forward turn right and move moveY forward, but i havent gotten to that part yet, because i have an issue.
My turtle received the commands( the moveX and moveY) but is receiving them as moveX and moveY and not 8 and 9.
I put some tonumber() in there, but i suspect i may not be using them correctly and that is the problem.
Computor:
turtle:
Hope i put them in spoiler tags…
My turtle received the commands( the moveX and moveY) but is receiving them as moveX and moveY and not 8 and 9.
I put some tonumber() in there, but i suspect i may not be using them correctly and that is the problem.
Computor:
term.clear()
term.setCursorPos(1, 1)
rednet.open("top")
moveX = 9
moveY = 8
tonumber (moveX)
tonumber (moveY)
rednet.send(3, "place")
print("Message send")
id, message = rednet.receive()
print(message)
rednet.broadcast("moveX")
rednet.broadcast("MoveY")
print("Message send")
turtle:
term.clear()
term.setCursorPos(1, 1)
print("Waiting for message")
rednet.open("right")
id, message = rednet.receive()
print(message)
moveX = message
id, message = rednet.receive()
print(message)
moveY = message
print("Message received")
Hope i put them in spoiler tags…