LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Fantom SDK

Kjeld and James,

Thanks for your help!!

Kjeld, I know we originally talked about using the BT Messages and mailbox system in the NXT to send data, but I have found that using the SendDirectCommand.vi works great for collecting data from the sensors and commanding the NXT to move its motors.

Our plan is to use LabVIEW running on our desktops to do heavy calculations like Fuzzy Logic, Neural Nets and Genetic Algorithms and simply use the BlueTooth-connected NXT has a physical manifestation of the modeled software robot.

I have attached our first LabVIEW 8.0 code for collecting data and sending commands via BlueTooth.   It is based on the NXT configuration of the "TriBot", that is all three motors connected, and the Touch sensor in Channel 1.

We are working to talk to the sound and light sensor and then moving on to talk to the Sonar device.

Please let me know if it works for you.

Many thanks!

-Bill  =]

0 Kudos
Message 21 of 28
(6,432 Views)
Hi Bill and James

I have just worked with some new ideas.
I have made 2 small programs. A PlayTone program and a Motor program.
I can control the NXT from LabView directly, skipping the LEGO Mindstrom NXT program.

The Motor program is not finished, but it was my idea, that the control of it should be like in the LEGO Mindstorm program.
This way I don't need the BlueTooth connection, and can do everything over the USB connection.

Regards Kjeld
0 Kudos
Message 22 of 28
(6,388 Views)
Hi,
I am having some problems in sending data to the Fantom DSK direct commands.

Can someone please help me?

What I am trying to do is :
1> Send a packet to the NXT to start an application after it has been paired. "Spike Remote"
2> send in integer between 1 -5 to the NXT.

Though I am nuable to formulate the packets using fantom.

Can some one please tell me what the Direct command needs as input. Just the data ot the command type also?

Thanks

Message Edited by JacoNI on 11-15-2006 05:22 AM

0 Kudos
Message 23 of 28
(6,350 Views)
Hi,

I will just point out one error. You should not put 0x00 or 0x80 at the begining of the array as it is included automatically by the sendDirectCommand.vi (there is a boolean input for this).

Just remove the first byte and then it should work.
0 Kudos
Message 24 of 28
(6,334 Views)
Hi All

Also the output will not include the first byte.
So if the documentation for DirectCommands says it returns 24 byte, then the LabView VI will only return 23.

Kjeld
0 Kudos
Message 25 of 28
(6,331 Views)
I trying to use driver sdk 's vi to download firmware ,but i don't know how to do it .
 
searching the document and look for it ,I suggest the follow as blow ,can any one send me a example to do it ?
 
findnxt
bootSamba
findDeviceInFirmwareDownloadMode
createNXT
downloadFirmware
destroyNXT
 
 
Is it correctted?
0 Kudos
Message 26 of 28
(5,749 Views)
What about redistributing the fantom drivers with your application? What are the license requirements? Can you give information on what needs to be installed?
0 Kudos
Message 27 of 28
(4,515 Views)

Otherwise I can read and write files, retrieve device data but sendDirectCommand does not do anything to my Lego Mindstorms NXT.

// this should play a tone

       ViUInt8 directCommandBuffer[] = {0x03, 0x7F, 0x18, 0xE0, 0x0F,0x01 };
 // it should play a tone but it does nothing. It generates status 0xBFFF003E

       nxtPtr->sendDirectCommand(false,directCommandBuffer,sizeof(directCommandBuffer),NULL,0,status);

My NXT is not responding to any direct command from the consol. Please any help would be wonderful!


0 Kudos
Message 28 of 28
(3,189 Views)