void setup() {
// put your setup code here, to run once:
Serial1.begin(9600);
Serial1.println("Hello, Raspberry Pi Pico!");
pinMode(6, INPUT);
pinMode(28, OUTPUT);
digitalWrite(28,LOW);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(6)==HIGH){
Serial1.println("Sensor On....");
digitalWrite(28,HIGH);
delay(10000);
digitalWrite(28,LOW);
}
delay(1); // this speeds up the simulation
}