Hello all
Ive bought this light sensor module:
http://www.fasttech.com/products/0/10004903/1380700-photosensitive-diode-light-sensor-module
Ive put GND to GND, Vcc to 5 v on arduino and signal to A1.
I have uploaded this sketch to it:
int sensorPin = A1;
int lightValue = 0;
// The light sensor
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the analog input on analog pin 2 (the light sensor):
lightValue = analogRead(sensorPin);
// print out the value you read:
Serial.print("The lightvalue is ");
Serial.println(lightValue);
delay(500); // delay in between reads for stability
}
This results in an output of 221 in the serial monitor. Nothing happens when I put more light onto it or cover it up. When adjusting the potentiometer on the module it jumps at one point to 249.
Any ideas what I am doing wrong?