const byte LED = 13; const byte buton = 2; boolean butonDurum; void setup() { pinMode(buton, INPUT_PULLUP); pinMode(LED, OUTPUT); } void loop() { butonDurum = digitalRead(buton); if (butonDurum == 0) digitalWrite(LED, HIGH); else digitalWrite(LED, LOW); }
No responses yet