How detect Colors without flashing LEDs

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: imaqine, 99jonathan, roger

Leonie
New User
Posts: 2
Joined: Tue Sep 15, 2015 11:19 am

How detect Colors without flashing LEDs

Postby Leonie » Tue Sep 15, 2015 11:29 am

Hallo,
I'm using the color Sensor of my NXT lego roboter to detect a red flashing surface on my washin machine. I know that the sensor detects colors throught flashing the LEDs and registering the reflected light. The Problem is, that the surface reflects too much and I can't differentiate between when the surface is alight and when it is not. I already tried just to read the light values with getNormalizedLightValue() but it still doesn't work.
Is there a way that the Sensor just detects colors without flashing the LEDs before?
Thank you very much.

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

Re: How detect Colors without flashing LEDs

Postby gloomyandy » Tue Sep 15, 2015 8:37 pm

Have you tried simply using some sort of tube to cover the light and the sensor so that you do not get any reflected light? Using something like a ring of blu-tac to mount the sensor so that it covers the light (but leaves the sensor uncovered and pointing at the light), may do the trick.
leJOS news https://lejosnews.wordpress.com/

Leonie
New User
Posts: 2
Joined: Tue Sep 15, 2015 11:19 am

Re: How detect Colors without flashing LEDs

Postby Leonie » Wed Sep 16, 2015 9:39 am

I tried that just now, but the problem is, that the sensor seems to be at the same place as the light.
But with the tube I can now finally use the readings of the ambient light with getNormalizedLightValue, so thank you very much for the idea :D
My roboter just works fine now

skoehler
leJOS Team Member
Posts: 1550
Joined: Thu Oct 30, 2008 4:54 pm

Re: How detect Colors without flashing LEDs

Postby skoehler » Wed Sep 16, 2015 2:06 pm

Or simply use a color filter (something that is red and transparent). Then disable the LEDs of the color sensor and simply record the brightness. If there is a sudden rise and decline in brightness, then the LED is blinking.


Return to “NXJ Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests