Bluetooth data logging and debug on the nxt

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Re: Bluetooth data logging and debug on the nxt

Postby kirkpthompson » Thu Aug 25, 2011 2:23 pm

Hi Aswin. I published a small test program that you could use to verify functionality. It uses a gyro and sends the raw readings to the logger. While running, hitting ENTer on the NXT will create an "Event" comment in the log and chart:
http://dl.dropbox.com/u/32153704/GyroLog.zip

You may need to tweak the import and package namespace for all things "net.mosen.*" to reflect your structure.

Best,
-K
Leg Godt!
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Re: Bluetooth data logging and debug on the nxt

Postby Aswin » Thu Aug 25, 2011 4:08 pm

Kirk,

Thanks a lot for the quick replies. Both my own program and the provided sample program work. Although I had to comment out the writeComment call as this is not available in my snapshot. I'll try to upload a sample graph later on.
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 199
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Bluetooth data logging and debug on the nxt

Postby kirkpthompson » Thu Aug 25, 2011 6:39 pm

Hi Aswin. If you grab the code for
    \trunk\classes\lejos\util\PIDController.java
    \trunk\classes\lejos\util\NXTDataLogger.java
    \trunk\classes\lejos\util\Logger.java
    \trunk\classes\lejos\util\LogColumn.java
of of SVN repos, the writeComment() will be available. Make sure your compiled versions of these are in the CLASSPATH before the \snapshot\lib\nxt\classes.jar. As a developer, to get the latest and greatest (or latest and broken) snapshot, I have the entire \trunk\* checked out and use ant to build the \trunk\snapshot locally. The problem is I don't update the snapshot in the repos. as it's not really under my purview (or if it is, I don't know the best practices used by the LeJOS team). Anyway, I am hesitant to step on other folks toes if I do something stupid in the snapshot so I keep mine local.

Thanks for testing all this out and please provide feedback (positive and negative as long as it's constructive :-)) and suggestions. We are working on optimizing some of the communication stuff so this project is not totally firmed up yet.

Best,
-K
Leg Godt!
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Re: Bluetooth data logging and debug on the nxt

Postby Aswin » Thu Aug 25, 2011 9:40 pm

Kirk,

No need to apologize for not providing a coherent snapshot. I'm very glad with what you have made thus far. I was able to make some nice graphs of the internals of my IMU filter. You can find them in this post on my blog.

I didn't use your PID-controller class for it as it is based on integers and my filter uses a cosine matrix, its elements having a range of -1 to 1. But I studied the code for this class and got some useful ideas from it.
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 199
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Bluetooth data logging and debug on the nxt

Postby kirkpthompson » Thu Aug 25, 2011 11:22 pm

Hi Aswin.

Nice Blog! (and nice looking charts!) A little off-topic but I am wondering if the PIDController could be used in your application with scaled integers (representing floating point numbers) or maybe... the PIDController should be able to use floats... ?

I chose int to ease the MCU of the burden of doing lots of float calcs (although some are used). This is a little dated but you may be interested: http://lejos.sourceforge.net/forum/viewtopic.php?f=7&t=2550

Best,
-K
Leg Godt!
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Previous

Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff