int button1 = 16;
int button2 = 17;
int led1 = 14;
int led2 = 27;
int input1;
int input2;
void setup() {
pinMode (led1, OUTPUT);
pinMode (led2, OUTPUT);
pinMode(button1, INPUT_PULLUP);
pinMode(button2, INPUT_PULLUP);
}
void loop() {
// baca button
input1 = digitalRead(button1);
input2 = digitalRead(button2);
if (input1 == LOW) {
digitalWrite(led1, HIGH);
}
if (input1 == HIGH) {
digitalWrite(led1, LOW);
}
if (input2 == LOW) {
digitalWrite(led2, HIGH);
}
if (input2 == HIGH) {
digitalWrite(led2, LOW);
}
}