LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I run an embedded program on me LEGO Mindstorm 2.0 using LABVIEW??

Hello guys,

 

 I am working now on my Lego mindstorm 2.0.. But i have a problem on my robot on how to work with this problem:

 

    I made a security robot, it has ultrasonic sensor. the ultrasonic sensor is set up to 15 inches. Once the ultrasonic sensor detects a object it will alarm.

   .(I do the programming in the Lego Mindstorm software not with Labview.)   and now I want to do with my robot is when the sensor detects it will send a

    SMS Message to my cellphone. My friend tells me that once the sensor detects it must connect the NXT BLUETOOTH to the BLUETOOTH  of the

    cellphone. I believe that I can use labview with my problem.

 

   and the cellphone will text to my cellphone. Can i do it with Labview? Can i save a program to my NXT brick to do that? because the first cellphone

  works as a transmitter and the second cellphone will recieve the Message. Can you please give me ideas and example to do this. I am really new to

 Labview. I use labview 9.0 trial version. Thank you.

0 Kudos
Message 1 of 13
(10,262 Views)

Hi Weeward,

 

You will need to send a signal from your NXT robot to your host computer signaling the alarm condition.  You can use Bluetooth for that.  You can then send an email to your cell phone to receive the text message.  The text message address will vary based on your cell phone carrier, but most carries allow this.  I do not believe there is any way to send a text message via Bluetooth on a cell phone.  The "text message" on the Bluetooth palette refers to sending text data, not an actual text message via cell phone. Below is a link for sending yourself an email with LabVIEW.  You will just need to put in the proper address to get the message:

 

Sending SMTP Email from LabVIEW

http://decibel.ni.com/content/docs/DOC-7451

 

 

Nick Keel 

Applications Engineering 

National Instruments

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 2 of 13
(10,253 Views)

Hi Nick

  

    Thank you for the information that you give to me. may I ask about the email that you said. I really need to send a Text message but not email. 

    Because when I heard the word Email, for me it needs a internet connection and a username and a password. Can I do it with a SMS message?

    A Text Message?? What I am trying to do is I don't want to use the Host computer to signal the NXT robot.

    (I will use the computer for programming only) I want to try that the NXT robot will send

    a bluetooth signal to the bluetooth of the cellphone and after the signal has been done, the program inside the NXT robot including sending signal to

    the Bluetooth of a cellphone it will send a Text Message.I apologize for my question I am really new to Labview. It is possible? can u send me some

    ideas and example? Thank you Nick!

0 Kudos
Message 3 of 13
(10,248 Views)

Hi Weeward,

 

You would need to be able to communicate with your cell phone with NXT Bluetooth.  That means that you would need to know the low level commands that the phone expects.  You can find the commands for most cell phone manufacturer by downloading the NXT Bluetooth support module from the Lego website.  The link is below:

 

http://mindstorms.lego.com/en-us/support/files/Advanced.aspx

 

Once you know the commands to communicate with your phone you would need to either write an application (iphone or Android Phone) or a LabVIEW PDA VI (Windows Mobile with the PDA Module installed) to send a text message when you get an input from your Bluetooth connection.  If you are using a different phone, you will have to access the internal software of the phone and program it to send text messages based on Bluetooth input.  This programming will vary depending on phone manufacturer.

 

 

Nick Keel 

Applications Engineering 

National Instruments

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 4 of 13
(10,232 Views)

Nick's latest answer is spot on, but just to clarify... It sounds like there are three modes of communication floating around in this thread.

  1. Bluetooth, which is supported by the NXT, several cell phones, and most computers.
  2. the Internet, which your computer supports, but your cell phone probably doesn't and the NXT certainly doesn't.
  3. SMS / wireless phone network, which is supported only by your cell phone.

For most cell phone service providers in the U.S., you can send an email to a particular address -- usually something like 8005551234@mycell.com -- and that company will turn it into an SMS message and send it to your cell phone. Nick previously suggested that the NXT could send a Bluetooth message to your computer, the computer could send an email to your cell phone company, and the company would send an SMS message to your phone.

 

But it sounds like you want to cut out the computer altogether. In that case, as Nick describes, you'll need to write an application for your cell phone that can receive Bluetooth messages and send SMS messages. In particular, to recieve messages from the NXT, your cell phone must support the Serial Port Profile, and you'll need to look at the Advanced MINDSTORMS support documents (see link in Nick's post) to learn the exact format of the messages that the NXT sends. You'll probably also need to read some documents from the manufacturer of your cell phone to learn how to write applications for your phone.

 

Here's a link to an example of someone who has done something similar (controlling an NXT from a cell phone): http://nxt-symbian.sourceforge.net/

------
James Blair
NI R&D
0 Kudos
Message 5 of 13
(10,230 Views)
Hello James and Nick.

Thank you guys for your responds.. i am now studying it and working on it.. May I ask that every time I run the program using labview i choose targeted to NXT. It says that no NXT are connected to my computer.. What do you think is the problem with that? Is there a new firmware for Labview? I have a Firmware version of 1.28.. I cant test any program to my NXT right now.. Please help me.. Thank you!
0 Kudos
Message 6 of 13
(10,202 Views)
Looks like you've already asked that question (and received a response) here, so I'll go ahead and let that discussion run its course. After you've solved that problem, if you still have questions about how to get the NXT and your cell phone talking, feel free to continue this thread.
------
James Blair
NI R&D
0 Kudos
Message 7 of 13
(10,193 Views)

In another thread...

 


@Weeward wrote:
I have another favor to ask, can you please give me a program sample on how to send a SMS  using Labview because unfortunately I dont have any idea where to start. Thank you very much..
One more, do you think aside from using Labview to send sms, is it also possible to use Java?' will NXT accept it? if it is so, can you please give me sample program?

PS: Guys I only have more than 2 weeks to solve this problem because at the end of this month I must present and defend my project. I used to ask my friends and other people but they dont have any idea or broad knowledge about NXT. So please help me guys till I finish this project..Thank you.


It sounds like you are short on time and desperate for solutions! Unfortunately, I'm not aware of anyone that has already completed this exact task and has example code available.

 

Please go back and re-read my previous post about different modes of communication. The NXT will not be able to accept SMS messages -- it can only accept Bluetooth messages sent through the Serial Port Profile. I'm pretty sure Java provides functionality that would allow you to do this.

 

Have you considered alternate programming languages for the NXT? You can find a short comparison of languages here: http://www.botmag.com/articles/10-31-07_NXT.shtml

 

Keep in mind that we can't offer much assistance with other languages, but if those languages are more familiar to you, they may help you get to a solution more quickly.

 

------
James Blair
NI R&D
0 Kudos
Message 8 of 13
(10,177 Views)

Hello, i have the same problem. I want to text through my phone by using a lego's nxt. The reason for me to do this is to be able to analyze between one - three simple digital sensors and be able to send a  sms text in case of emergency. This device has to be in a trailer which gets up to 100 degrees. I have currently used a usb daq to get the sensor information and through labview have set up alarms, however the heat has been too much for the computer and it constantly turns off. I am looking for the most inexpensive way to do a simple telemetry system . If you could suggest another solution or help solve the lego texting it would be greatly appreciated.  

0 Kudos
Message 9 of 13
(8,946 Views)

Hello, i have the same problem. I want to text through my phone by using a lego's nxt. The reason for me to do this is to be able to analyze between one - three simple digital sensors and be able to send a  sms text in case of emergency. This device has to be in a trailer which gets up to 100 degrees. I have currently used a usb daq to get the sensor information and through labview have set up alarms, however the heat has been too much for the computer and it constantly turns off. I am looking for the most inexpensive way to do a simple telemetry system . If you could suggest another solution or help solve the lego texting it would be greatly appreciated.  

0 Kudos
Message 10 of 13
(8,945 Views)