Light Sensor Array and LeJOS

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

Moderators: roger, 99jonathan, imaqine

Light Sensor Array and LeJOS

Postby MisterErwin » Sat Feb 02, 2013 7:20 pm

Hello together,

is there already a class for the Light Sensor Array Sensor by mindsensors? Or are there any ways to access it with LeJOS

The LineLeader Class doesn't work with it.

Thank you very much....
MisterErwin
New User
 
Posts: 3
Joined: Fri Dec 07, 2012 8:30 pm

Re: Light Sensor Array and LeJOS

Postby skoehler » Sat Feb 02, 2013 7:55 pm

We seem to have a driver for the Line Sensor for NXT. But not for the Light Sensor Array. You may have to implement the driver yourself. If you have something that work, you should think about contributing the code. We would be happy to accept it.

Maybe the code for the Line Sensor can be adapted to work with the Light Sensor Array? The hardware looks very similar - but the I2C interface might be very different.
skoehler
leJOS Team Member
 
Posts: 1115
Joined: Thu Oct 30, 2008 4:54 pm

Re: Light Sensor Array and LeJOS

Postby MisterErwin » Sat Feb 02, 2013 8:08 pm

skoehler wrote:We seem to have a driver for the Line Sensor for NXT. But not for the Light Sensor Array. You may have to implement the driver yourself. If you have something that work, you should think about contributing the code. We would be happy to accept it.

Maybe the code for the Line Sensor can be adapted to work with the Light Sensor Array? The hardware looks very similar - but the I2C interface might be very different.


Yes... they are very diffrent: (Says mindsensors.com)
Internal design
Internally their processors and firmwares are different, the NXT-G blocks and NXC/RobotC API's are also different. (Note, they don't work with each other).

The old sensor internally performed the line following computations, and provided simpler output to follow a line.
The new sensor only provides 8 numeric readings for 8 sensors. It does not perform any computations internally. It is somewhat faster than the old one in reporting readings. You have to write your own line following algorithm.


And the "old" Line Sensor/LineLeader isn't accepted in the RoboCup Rescue Competition, because of their PID algorithm.

And I (or we) haven't anything yet...

Our "teacher" tried something, but it doesn't work...

The I2C Registers & Commands are listed in the user Guidehttp://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=218
Last edited by MisterErwin on Fri Feb 08, 2013 8:18 pm, edited 1 time in total.
MisterErwin
New User
 
Posts: 3
Joined: Fri Dec 07, 2012 8:30 pm

Re: Light Sensor Array and LeJOS

Postby skoehler » Sat Feb 02, 2013 8:57 pm

On the contrary! The I2C communication with the two sensors is very similar. The command register is at 0x41, the commands are W B D and P etc. for both sensor. Some data is at a different offset (for example the calibrated data resides at 0x42 instead of 0x49). But you (or your teacher) should be able to change that pretty easily.

Of course, you have to implement the PID algorithm yourself. A driver for the light sensor array wouldn't do that anyways.


I don't have the time to write a driver for you right now. And as it seems, you need it soon rather than later. So I can't help.
skoehler
leJOS Team Member
 
Posts: 1115
Joined: Thu Oct 30, 2008 4:54 pm

Re: Light Sensor Array and LeJOS

Postby MisterErwin » Sun Feb 03, 2013 5:06 am

skoehler wrote:On the contrary! The I2C communication with the two sensors is very similar. The command register is at 0x41, the commands are W B D and P etc. for both sensor. Some data is at a different offset (for example the calibrated data resides at 0x42 instead of 0x49). But you (or your teacher) should be able to change that pretty easily.

Of course, you have to implement the PID algorithm yourself. A driver for the light sensor array wouldn't do that anyways.

I don't have the time to write a driver for you right now. And as it seems, you need it soon rather than later. So I can't help.


Ok thanks...

We'll try it today (Deutsches Museum Bonn ;)). Maybe we can redeem our two LightSensors.
MisterErwin
New User
 
Posts: 3
Joined: Fri Dec 07, 2012 8:30 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff