Jump to content

[Need] Help - sending coordinates

Recommended Posts

Hi guys,

I try to set up a decent GPS system to navigate alle my stuff with it. The core system is up and running, and i can locate all my positions. The only problem that I've is that I cant send my coordinates over rednet. For example I wrote some code:

rednet.open("top", 1)

x, y, z = gps.locate(3)


vec={ value1=x, value2=y, value3=z}


rednet.send(1, svec)



Now on the receiver side:


rednet.open("top", 1)


id, msg, dist=rednet.receive()





I cant access the transmited values 1-3 It just crashes with attempt to call nil...

Pls help me I'm getting crazy about this :-D

PS:I've checked svec and it was created correct I think the problem is in the gps.locate function, cause if I hardcode the values 1-3 and then transmit the array everything works like a charm.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...