top of page

Read Light Value Code
​int lightValue;
void setup() {
Serial.begin(9600);// open serial monitor port
}
void loop() {
int lightValue = analogRead(A0); // reads light intensity
Serial.println(lightValue); // prints value to the serial monitor
delay(10); // delay in between reads for stability
}
bottom of page