#define pinLDR 2
void setup() {
// put your setup code here, to run once:
pinMode(pinLDR, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(pinLDR) == LOW) {
Serial.println("Ada cahaya!");
} else {
Serial.println("Gelap Coy");
}
delay(100);
}