void setup() {
// put your setup code here, to run once:
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico!");
pinMode(7 , INPUT);
pinMode(8 , OUTPUT);
}
void loop() {
int pirsensorvalue=digitalRead(7);
Serial1.println(pirsensorvalue);
if(pirsensorvalue==1)
{
digitalWrite(8 , HIGH);
}
else
{
digitalWrite(8 , LOW);
}
// put your main code here, to run repeatedly:
delay(1); // this speeds up the simulation
}