how can a light sensor be used to read colors, in particular red - lego-mindstorms

how can a light sensor be used to read colors, in particular red. I don't have a color sensor, I have a light sensor. how can i use light sensor instead of color sensor

When using a light sensor, you are able to use red color-filter, placed in front of a light sensor, to detect red light only.
Colors filters will filter the colors of incoming light, making it so only red light would be visible to the light sensor.
A color filter would probably be sold separately from a light sensor, although you could probably do some shopping around to find cheap examples.

Related

How to make a torch (iPhone) with colored light in swift?

I have tried to read AVFoundation documentation and I can't find anything about colors. Is it possible to change the color to red, green or blue? I think I have seen colored torch apps.
Would it be very hard to write your own code that controlled color hue or lumen of the flashlight?
While there are apps that get around this by display a brightly colored screen, the flash on the iPhone is has a single LED element.
You do, via AVCaptureDevice, have the ability to change the intensity of torches on some models. Take a look at the torchLevel property.
You could always try an easy hardware hack.

How to check for the matching colors in Unity3d

I am scanning a Rubik cube by mobile camera. I am getting the colors of the sides, but even same colors have slightly different color value. Is there a way to detect this ?

Unity - How can I control fog color based on skybox color?

I have a gradient on a skybox, and I want the terminal fog color to be the same as the sky color behind the object that is being occluded. But it still needs to be fog and respect distance.
I see one way of doing it without actually using fog, with a gradient of my choosing on a skybox. The skybox gets masked out by the depth map, and then overlaid onto the non-sky geometry. You would be able to look down into the depths, and the blackness below gets darker gradually like a "fog" because it is masked by the depth operation. Look up and see the same phenomenon with the lighter color. Basically control "fog" terminal color by camera angle.
What would be the best way to implement this, and could it be performant on mobile devices?

Is there any api to find out the room temparature intensity , light intensity etc

Thanks in advance.
Is there any api in iphone to calculate room or surrounding temperature intensity , light intensity programatically.
is it possible to find light intensity using iphone camera programatically.And i found out this app http://itunes.apple.com/us/app/realthermo/id432583584?mt=8 . Here some light and temperature measured apps are there.
No,
The iPhone does not contain a thermometer.
Also there is no public API for accessing the ambient light sensor.

OpenGL ES flash of bright light

I'm having some trouble achieving my desired effect in an OpenGL ES app I'm working on. I can use OpenGL ES 1.1 or 2.0. What I'm trying to achieve is the following...
In a 2D ortho scene (black clear color), render a red square to the screen with some transparency so it is a darker red (or just set to darker red color). This is no problem for me. Then, when a user clicks in the region of the square, I want it to quickly flash in a bright flash of light (just in the region of the square). This flash doesn't have to persist long at all, just enough that if the user was in a completely dark room, this flash of light would create a brief noticeable flash in the users face. I've been having some trouble getting a "light bloom" or glow effect to work efficiently, and was wondering if anyone had ideas for a quick, efficient way to make the color flash brightly for a split second. Possibly through the use of some kind of texturing trick that I don't know of. Also, the flash doesn't have to blur outside of the region, it can be fully contained within the region with sharp edges. Really all I'm after is the aesthetic of the flash lighting the immediate area around the screen.
Disable texturing, glColor3ub(255,255,255), render square, wait a bit, redraw square normally.