Send data to computer NXT-G

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
hyperlaser
Posts: 4
Joined: 01 Mar 2012, 15:37

Send data to computer NXT-G

Post by hyperlaser »

Hi!

Is there a way to send data from the NXT to the computer via bluetooth or USB using NXT-G?
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: Send data to computer NXT-G

Post by mcsummation »

In the "complete palette", Send Message and Receive Message (with the funny Bluetooth icon) are how you communicate over Bluetooth. There are a number of threads here that have been active in the last month about how to do it. You need a program on the PC end to get the data.
hyperlaser
Posts: 4
Joined: 01 Mar 2012, 15:37

Re: Send data to computer NXT-G

Post by hyperlaser »

Is there any free program to get the data on the computer?
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: Send data to computer NXT-G

Post by mcsummation »

Someone else might know of a free/general program. I wrote my own as a learning exercise for Bluetooth and the PC side language. If no one else pops up, tell me:
1) What data type is coming to the PC in each mailbox;
2) What you want done with the data once it gets into the PC - mine just displays it in a simple "one message, one line of data" format, but it could be written to a file or "whatever";
3) Mine opens the Bluetooth connection, starts the program in the NXT, then starts getting data. If that won't work, tell me what you want.

Would you like some source and guidance on the PC side? It's a valuable learning exercise. :o
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Send data to computer NXT-G

Post by afanofosc »

You can poll for mailbox messages using nexttool as a command line application. BricxCC will also soon have support for the NXT in its recently added Simple Terminal tool.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
hyperlaser
Posts: 4
Joined: 01 Mar 2012, 15:37

Re: Send data to computer NXT-G

Post by hyperlaser »

I want to send numbers to the computer and save them to a text or excelfile. It will be very many numbers and they will be sent with about a second in between. Between every number i want it to change row. I hope you understand wath i mean ;)

I would love to get some guidance and write it on my own but the only programing knowledge i got is NWT-G and wery little but some C#. I have made some wery simple applications for Windows Phone 7.
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Send data to computer NXT-G

Post by h-g-t »

I have done a quich search and most sites about datalogging say you have to save the data in a csv file which you can upload when the procedure is finished.

However, this youtube video refers to using the Mindsensors NXTPowerMeter to upload data in real time to Excel. Personally, apart from the fact they are using I2C, I can't see how they do it but it might be worth a look.

I have also come across a couple of vague references which suggested that it might be possible with RoboLab, but no actual examples.

Also there is a reference in this blog to sending data to a pc in real time using Bluetooth -

http://nxttime.wordpress.com/
hyperlaser
Posts: 4
Joined: 01 Mar 2012, 15:37

Re: Send data to computer NXT-G

Post by hyperlaser »

h-g-t wrote:I have done a quich search and most sites about datalogging say you have to save the data in a csv file which you can upload when the procedure is finished.

However, this youtube video refers to using the Mindsensors NXTPowerMeter to upload data in real time to Excel. Personally, apart from the fact they are using I2C, I can't see how they do it but it might be worth a look.

I have also come across a couple of vague references which suggested that it might be possible with RoboLab, but no actual examples.

Also there is a reference in this blog to sending data to a pc in real time using Bluetooth -

http://nxttime.wordpress.com/
Saving the data will not be an alternative because the file will be to big.

It is possible to send the data to the computer and recieve it is possible with a program
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Send data to computer NXT-G

Post by afanofosc »

I think I can add something to BricxCC that will meet your needs. What I'm thinking of is a mailbox polling addition to the Watch window which will let you pick the mailbox number to poll. This will enable you to graph the values in BricxCC and export the data to Excel.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Send data to computer NXT-G

Post by afanofosc »

The latest BricxCC test release now includes support in the Watch tool for polling any mailbox. If you write to the mailbox using SendResponseNumber then BricxCC will correctly interpret the numeric value and display it in the edit field associated with the mailbox checkbox on the NXT Mailboxes tab in the Watch tool. If you Poll Regularly with the Graph tool open it will collect all the polled values and you can copy them to the Clipboard and paste as a column of values into Excel.


Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests