locked
Programming mindstorm NXT with visual basic? RRS feed

  • Question

  • Hello,

    Just started explorring the robotic world. Can someone help me with a program that controls a NXT mindstorm program and is written in visual basic?

    How can I make a connection? Has someone a good site that contains an example or tutorial??

    Thanks

    Wednesday, December 1, 2010 9:14 PM

Answers

All replies

  • RDS does not support Visual Basic.
    Saturday, July 9, 2011 4:36 AM
    Moderator
  • Hey MisterHonda,

    I know this answer is kinda late, but hopefully it can help out someone else.  You can easily write a program in VB to control your NXT.

    The NXT can accept commands / communicate over USB or Bluetooth.  You will need to send commands down to the NXT that are properly formatted and written in the correct syntax / protocol.  Since there is a lot to cover, I would recommend taking a look at this writeup here:

    http://www.robotappstore.com/Knowledge-Base/Programming-LEGO-NXT-Mindstorms/92.html

    It covers all the basics of the types of commands that you will need to send to the NXT as well as helpful examples.  The tutorial uses a more simplistic application to send the commands, however if you can duplicate that in VB (which is fairly simple), then you can easily make a program in VB to control you NXT.

    If you hook up your NXT to your computer via Bluetooth or USB, you can search for the connection in the device manager.  From here, you can determine which "COM" port # it is assigned to, and then in VB you simply address that com port, and send the commands you wish.

    If you have any further questions, I would recommend posting a question at the bottom of that writeup - since LEGO's own "direct bluetooth commands" description .pdf is written very poorly.  There are also some other apps you can download from the website and if you take a look around there they might even have some examples written in VB for you.  Here is one I found that uses C# - however should give you a great start:

    http://www.robotappstore.com/Apps/NXTNET-for-LEGO-Mindstorms.html?x=CB7E4B7D-5878-49C5-8254-7F1924F1330F

    Hope this helps!

    Friday, September 7, 2012 6:33 AM