light sensor questions

hello I have a light sensor moudle for sensor shield but I wont have the sensor shield for another 14 days at least so can you tell me what each pin is for(there are 3 of them) and in order if you can... and can a light sensor sense lights? like if its connected to an analog pin and I tell it to send the data its recieving would it tell the difference between green and yellow? and can you give me an example code please

don’t know the type number of your light sensor (please provide) so my answers are speculative

Three pins: Ground, +5Volt (or 3.3) and a signal. which one is what, unkown.

  • the signal can be proportional to the light intensity or
  • it acts like a switch, above a certain intensity it is ON below it is OFF

for me a light sensor senses the amount of light, the intensity (lux); not the color or frequency.

Connect the signal to the analog in.

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  int x = analogRead(A0);
  // do a conversion formula here
  Serial.println(x);
}

There are several sketches discussed on this forum, search for LDR or Light Resistor

succes

All it says on it is Sensor V 2.0 www.falmingoeda.com R2 VR2 C1 R1 and what is a signal and what should I connect it to? is it GRD Analog pin 5v ?

The website is not reachable and the rest of the information yyou provided is too little to help, sorry think you have to wait for the shield to arrive :(

Thanks but usually what are the pins for? control pin(signal?), ground and 5v? btw I worked with those lego robots and their light sensors recognized colors, that was their point so what sensor does this? gives a number according to the wave length or soemthing like that?

Thanks but usually what are the pins for? control pin(signal?), ground and 5v?

yes.

btw I worked with those lego robots and their light sensors recognized colors, that was their point so what sensor does this?

http://www.sparkfun.com/products/8618

gives a number according to the wave length or soemthing like that?

http://www.sparkfun.com/datasheets/Sensors/Imaging/AV02-0314EN.pdf

Thanks and its http://www.flamingoeda.com/

This one? http://www.flamingoeda.com/index.php?title=%E7%94%B5%E5%AD%90%E7%A7%AF%E6%9C%A8:%E5%85%89%E7%BA%BF%E4%BC%A0%E6%84%9F%E5%99%A8

Given up on the DC motor then?

thats the one and no :D im just waiting for some parts to arrive so I can do the driving right...

never mind I managed to connect it manually and it works…(the light sensor) but I also noticed that even when it wasnt connected I still got input that changed when I turned off the lights
are there light sensors on the arduino? in the LED, analog pins?

are there light sensors on the arduino? in the LED, analog pins?

LEDs can be light sensitive, but it is more likely you left your analogue input lines floating.

Thanks for everything I just made 2 things: used a button and the light sensor and made it so when the button is pushed it prints out how much light it picks up used a light sensor in analog input and led in analog output to make it so it powers the led according the light it picks up finally I managed to do 2 things I wanted and the arduino board isnt getting hot!!!!!

btw: the light sensor detects light as numbers, what do they mean? are they a random or known scale?

the light sensor detects light as numbers

No, it detects light as a product of the photoelectric effect. Einstein won a Nobel prize in 1921 for an explanation of the effect.

No, there is no (simple) means of calibrating readings against light intensity. The best you can say is lighter/darker.

the lines got scrambled and I cant find the right order

I got a black, white and red wires what goes where? is it: black = GND red = 5v white = A2 ?

Methinks an LDR and a resistor would be an order of magnitude simpler.........