This is how long I've come so far:
(Also on pastebin: D1UKi7vU)
Spoiler
This goto program uses it's current position as x, y and z coordinates and the direction 0 (facing the Z-axle).
That means that if you run the program like this
-- goto x y z goto 0 0 4it will then go 4 times forward.
But what I want to do is to replace this
local posX, posY, posZ = 0 dir = 0with some way to detect the pos and dir.
The detection of the pos is really simple, just do
rednet.open("right")
local posX, posY, posZ = gps.locate(.5)
rednet.close("right")
if not posX then
print("Could not locate position!")
return
end
but the tricky part comes in where I need to find out the direction...If you come up with some clever way to detect this then I would love to see some suggestions from you guys!
Thanks!
//Kalle
EDIT: I found out why the program was acting weird! The x-coordinates was kind of inverted. Instead of going 2 steps forward on the x-axle it went 2 steps backward...












