int pirPin = 2; // Pin connected to the OUT pin of the PIR sensor
int ledPin = 13; // Pin connected to the LED strip
void setup() {
pinMode(pirPin, INPUT); // Set the PIR pin as input
pinMode(ledPin, OUTPUT); // Set the LED pin as output
}
void loop() {
int motion = digitalRead(pirPin); // Read the PIR sensor's output
if (motion == HIGH) { // If motion is detected
digitalWrite(ledPin, HIGH); // Turn on the LED strip
} else {
digitalWrite(ledPin, LOW); // Turn off the LED strip
}
}