// Define the PIR sensor pin const int pinPIR = 26; void setup() { // Start serial communication Serial.begin(9600); // Configure the PIR sensor pin as input pinMode(pinPIR, INPUT); } void loop() { // Read the state of the PIR sensor int pirState = digitalRead(pinPIR); // If motion is detected if (pirState == HIGH) { // Print "movement" message on the serial port Serial.println("movement"); } else { // Print "off" message on the serial port Serial.println("off"); } // Wait for a brief period before reading again delay(1000); }