AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

lego colour sensor (not HiTechnic)

The forum is to discuss topics related to robotics, like building robot, controlling it, its software and hardware, etc.

lego colour sensor (not HiTechnic)

Postby nemnem » Wed May 25, 2011 5:35 pm

http://www.active-robots.com/products/m ... sensor.jpg

I got everything working except for the color sensor so I was wondering if any of you could help?
before this post I searched on google and AForge and tried the "NXT Test" program and ofcause I tried coding it my self but I give up
so this post is my last try for the sensor before my exam


since im here anyways I would like to thank everyone who has helped making the Framework it has allowed my school to start a new project for C# programming which is more fun than everything in school combined
nemnem
 
Posts: 1
Joined: Wed May 25, 2011 2:39 pm

Re: lego colour sensor (not HiTechnic)

Postby linusa » Thu May 26, 2011 3:05 pm

The LEGO NXT 2.0 color sensor is a bit complicated to access, there was confusion how it's possible via remote commands for some time. I compiled some of the available documentation here: http://www.mindstorms.rwth-aachen.de/trac/ticket/38 . Unfortunately, some old links to the NXTasy forums are gone. You can still ask the mindboards community here: http://sourceforge.net/apps/phpbb/mindboards/

But if you just want to port a working MATLAB version, see here:
http://www.mindstorms.rwth-aachen.de/tr ... XT2Color.m
http://www.mindstorms.rwth-aachen.de/tr ... XT2Color.m

If you don't have MATLAB, get an editor with syntax highlighting, such as Notepad++. You could also look at the nxt-python project to see how they do it...

Best regards, Linus Atorf
User avatar
linusa
 
Posts: 18
Joined: Mon May 16, 2011 5:04 pm
Location: Aachen, Germany

Re: lego colour sensor (not HiTechnic)

Postby linusa » Thu May 26, 2011 3:16 pm

I just remembered: There are working examples etc. included in NXC. Look at the NXC API in general (http://bricxcc.sourceforge.net/nbc/nxcd ... index.html ) or some specific sensor constants (e.g. http://bricxcc.sourceforge.net/nbc/nxcd ... tants.html ). This is where to get some of the "new sensor modes" for the LEGO NXT 2.0 Color sensor. You also need Firmware 1.28 or better. It might also help to inspect the actual sourcode of NXC / the NBC compiler / BricxCC (all one package, look for it). Then you can take this function, for example: http://bricxcc.sourceforge.net/nbc/nxcd ... e59f0c19ab , and see the actual sourcecode (NBC) for the compiler, and see what is done internally...
User avatar
linusa
 
Posts: 18
Joined: Mon May 16, 2011 5:04 pm
Location: Aachen, Germany

Re: lego colour sensor (not HiTechnic)

Postby piash006 » Sat Sep 10, 2011 3:32 am

he HiTechnic Color Sensor is “tuned” to standard LEGO colors. ... The Color Sensor V2 works best when it is positioned so that it is not too close to the surface :P
piash006
 
Posts: 5
Joined: Tue Sep 06, 2011 6:38 am




Return to Robotics

cron