LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

comunication between lego - pc

Solved!
Go to solution
Hi,
I have made a programme in LV which runs on the NXT to read a gyro.
But now I want to make another programme in the Computer, in which I need to know the values of the gyro.
So I want that the NXT in some way sent the data values to the pc.
I dont know which is the best way to do it, if just with BT messages, or with a excell file,...

Can anyone give me an idea?

Thanks
0 Kudos
Message 1 of 9
(9,705 Views)
Solution
Accepted by topic author youchange


youchange wrote:
So I want that the NXT in some way sent the data values to the pc.
I dont know which is the best way to do it, if just with BT messages, or with a excell file,...

Michael Gasperi's book, "LabVIEW for LEGO MINDSTORSM NXT" has examples of both.  Chapter 15 he shows how to write a program on the NXT that stores the data to a file while you have a program on the host that waits for the file to appear and then uploads it to the PC.  On the NXT you just use open file for write, write file, close file. On the PC you use upload file to PC block to get the data. You can also use the PC to control the NXT and tell it to start running, etc..

 

With bluetooth, you can use send message/receive message on both sides.

Message Edited by JS on 07-20-2009 10:06 AM
Joel Sumner
NI-Shanghai
Message 2 of 9
(9,704 Views)

ok! thanks for your answer

 

I also want to ask you if you think it will be real time, or almost; because I want it to control a two wheel self balancing, so I need to read the data oon the pc as soon as posible. what do you think?

0 Kudos
Message 3 of 9
(9,701 Views)

youchange wrote:

ok! thanks for your answer

 

I also want to ask you if you think it will be real time, or almost; because I want it to control a two wheel self balancing, so I need to read the data oon the pc as soon as posible. what do you think?


Any time there is communication between any target (NXT or not), it's almost never deterministic.  In addition, the communication latency is frequently high.  With the NXT, the communication is not deterministic and the latency is rather long.  Thus, it's unlikely you'll be able to get the loop rate you need to do a self balancing robot if you do the processing on the PC.  You should do the algorithm on the NXT's processor.  

Joel Sumner
NI-Shanghai
Message 4 of 9
(9,699 Views)

thanks again,

the problem is that if I make the control on the NXT I cannot use floating data. Any idea?

0 Kudos
Message 5 of 9
(9,697 Views)

Toolkit 2.0 and the new firmware supports floating point (though it is emulated). 

 

http://zone.ni.com/devzone/cda/tut/p/id/4435

Joel Sumner
NI-Shanghai
Message 6 of 9
(9,693 Views)
thanks so much for solve me the problem
0 Kudos
Message 7 of 9
(9,691 Views)

Hi Frields,

I am a new LabVIEW  user. I want to control remotely (may be via bluetooth) a LEGO MINDSTORSM NXT Robot by labVIEW . Anyone please help me what the basic steps I have to follow.

 

-Konica

0 Kudos
Message 8 of 9
(8,894 Views)

This article is intended to indicate the installation and configuration process between LabVIEW and educational robot Lego Mindstorms NXT wirelessly, this will enable LabVIEW developers in having a mobile platform for the development of projects and autonomous robots, we need to install some programs the computer:

 

https://decibel.ni.com/content/docs/DOC-32448    

 

5.png

0 Kudos
Message 9 of 9
(7,007 Views)