Hoşgeldin Misafir

Arduino IDE 'else' without a previous 'if' hatası

GozGoz

26 Ara 2017
599 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Arduino UNO ile butona basınca yanan, basmayınca yanmayan LED devresi yapmak istiyorum. Her şeyi hazırladım fakat kodlarken 'else' without a previous 'if' hatası verdi. Sebebini anlayamadım, bu işte yeniyim. Yardımcı olur musunuz? Proje ektedir.

Kodlama:
Kod:panoya kopyala

Kod:
int led = 3;
int buton = 2;

int butondeger;

void setup() {
  pinMode(led, OUTPUT);
  pinMode(buton, INPUT);
}

void loop() {
butondeger = digitalRead(buton);

  if (butondeger == HIGH);      {  digitalWrite(led...

Read more