void setup() {
pinMode(15, INPUT);
pinMode(10, OUTPUT);
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico!");
}
void loop() {
int pir = digitalRead(15);
if(pir==HIGH)
{
Serial1.println("Motion Detected");
digitalWrite(10, HIGH);
delay(5);
}
else
{
Serial1.println("No Detected");
digitalWrite(10, LOW);
delay(5);
}
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT