#define bot 5
#define led 26
void setup() {
// put your setup code here, to run once:
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico!");
pinMode(5, INPUT);
pinMode(26, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(1); // this speeds up the simulation
if(digitalRead(5)==HIGH){
Serial1.print("pressionado");
Serial1.print("");
digitalWrite(26, HIGH);
}
if(digitalRead(5)==LOW){
digitalWrite(26, LOW);
}
}