lejos.nxt.I2Csensor.getSensorType() method missing?

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: roger, 99jonathan, imaqine

lejos.nxt.I2Csensor.getSensorType() method missing?

Postby Docta_J » Mon Oct 08, 2012 6:44 am

I am attempting to use the dIMU drivers created by Aswin. While debugging, I found that the lejos.nxt.I2Csensor.getSensorType() method is no longer in the I2CSensor class written by Lawrie Griffiths. I checked both the source code for 0.9.1 and the .class file (using eclipse). This method is inherited by Aswin's Accelerometer class. It is called in a number of the .java files included in his nl.totan.* package. Can you suggest a workaround that will allow me to compile code that uses Aswin's drivers? I am new to both leJOS and java, but I am enjoying the learning process. These robots are addictive!

Windows 7 pro (64)
JDK1.7.0_07-b10 (32 bit installation only)
Eclipse Juno with NXJ plug in
leJOS 0.9.1beta-3_win32_setup
NXT 2.0
Docta_J
New User
 
Posts: 10
Joined: Sat Jul 07, 2012 3:15 am
Location: North Dakota, USA

Re: lejos.nxt.I2Csensor.getSensorType() method missing?

Postby gloomyandy » Mon Oct 08, 2012 10:25 am

That method has been renamed/replaced by the getProductID method, so you should be able to update the driver to use that. Note however that this sounds like you may be using a rather old version of that driver is rather old. The latest version of leJOS (0.9.1-3) seems to have drivers for the dIMU included and you should probably use those:
http://lejos.sourceforge.net/nxt/nxj/ap ... Accel.html
http://lejos.sourceforge.net/nxt/nxj/ap ... UGyro.html

Hopefully Aswin will be along shortly and will be able to answer any other questions!

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3012
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: lejos.nxt.I2Csensor.getSensorType() method missing?

Postby Aswin » Mon Oct 08, 2012 9:47 pm

Hi,

I guess you downloaded the INS filter from my blog. The drivers in this software are outdated. You have 3 ptions:
- use the drivers provided with lejos, they are DIMUaccel and DIMUgyro and found in the addon package.
- use both the outdated drivers and INS filter from Totan.nl
- wait until the INS filter is part of lejos (we are working on it).

Aswin
My NXT blog: http://nxttime.wordpress.com/
Aswin
Active User
 
Posts: 126
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: lejos.nxt.I2Csensor.getSensorType() method missing?

Postby Docta_J » Mon Oct 08, 2012 11:38 pm

Thanks for your prompt replies! I will try new+new and old+old and use whichever works best.
Docta_J
New User
 
Posts: 10
Joined: Sat Jul 07, 2012 3:15 am
Location: North Dakota, USA


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff