void setup() {

  Serial1.begin(115200);
  Serial1.println("Hello, Raspberry Pi Pico!");

  pinMode(21, INPUT);
  pinMode(16, OUTPUT);
}

void loop() {

Serial1.println(digitalRead(21));
  if(digitalRead(21)==1){
    digitalWrite(16, HIGH);
    digitalWrite(17, LOW);
  }

else{
  digitalWrite(16, LOW);
digitalWrite(17, HIGH);
  
}
delay(100);
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT