Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the jetpack domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/haydikod/robotkursu.com/wp-includes/functions.php on line 6114
Start Stop LED yak – Robot Kursu

Start Stop LED yak

/*

Bu örnek buton2 basıldığında LED i yakan, buton1 ye basıldığında söndüren bir programdır.

Butonlar pin 2 ve 3 bağlıdır, LED ise pin 13 e bağlıdır.

www.robotkursu.com

*/

const int buton1 = 2;

const int buton2 = 3;

const int ledPin =  13;

 

void setup() {

pinMode(ledPin, OUTPUT);

pinMode(buton1, INPUT);

pinMode(buton2, INPUT);

}

void loop(){

if (digitalRead(buton1)==HIGH){

digitalWrite(ledPin,LOW); // LED söndür

}

else if (digitalRead(buton2)==HIGH){

digitalWrite(ledPin, HIGH);//  LED yak

}

}star stop led yak_

Related Posts

LEDyak app inventor uygulaması

Bu uygulama ile android telefonunuzdan başlangıç modülü üzerindeki LED leri yakıp söndürebilirsiniz. arduino kodu için Read More

Arduino Scratch modülü 5: 7 Segment display kullanımı

Arduino scratch modülümüz ile 7 segment display kullanımına örnek dersimiz. Modül üzerindeki 7 segment displayRead More

Arduino Scratch modülü 4: Led animasyon

İlgili

Comments are Closed