const int led = 3;
int pb = 2;
const int buz = 1;
boolean cuih;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(buz, OUTPUT);
pinMode(pb, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
cuih = digitalRead(pb);
if(cuih == HIGH) {
digitalWrite(led, HIGH);
digitalWrite(buz, HIGH);
} else {
digitalWrite(led, LOW);
digitalWrite(buz, LOW);
}
}