const int sensorPin = D2;
const int ledPin1 = D0;
const int ledPin2 = D6;
const int threshold = 500;
void setup() {
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(sensorPin, INPUT);
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if (sensorValue < threshold) {
digitalWrite(ledPin1, HIGH);
digitalWrite(ledPin2, HIGH);
} else {
digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, LOW);
}
delay(100);
}