merhaba arduino ve röle kiti ile sıralı röle çektirmeye çalışıyorum, yani birinci röle çekip bırakacak ikinci röle o zaman çekip bırakacak, üçüncü röle de 2.röle kapanınca çalışacak kısaca sırayla açılıp kapanmasını istiyorum ama hepsi sırayla çekip aynı anda kapanıyor sırayla açılması problem değil ama sırayla kapanmıyor, hiç daha önce arduino kullanmadım kodlamasını bilmiyorum İnternette bulduğum kodların sayıları ile oynayarak istediğim süre çekip çekili kaldırabiliyorum tek problem sırayla kapanmaması, nasıl yapabilirim acaba yardımcı olabilecek var mı acaba, şimdiden teşekkür ederim.
KODLAR ;
// the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); }
// the loop function runs over and over again forever void loop() { digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level) delay(300); // wait for a second digitalWrite(2, LOW); // turn the LED off by making the voltage LOW delay(50); // wait for a second digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level) delay(300); // wait for a second digitalWrite(3, LOW); // turn the LED off by making the voltage LOW delay(50); // wait for a second digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level) delay(300); // wait for a second digitalWrite(4, LOW); // turn the LED off by making the voltage LOW delay(50); // wait for a second digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level) delay(300); // wait for a second digitalWrite(5, LOW); // turn the LED off by making the voltage LOW delay(50); // wait for a second digitalWrite(2, LOW); // turn the LED off by making the voltage LOW digitalWrite(3, LOW); // turn the LED off by making the voltage LOW digitalWrite(4, LOW); // turn the LED off by making the voltage LOW digitalWrite(5, LOW); // turn the LED off by making the voltage LOW delay(5); // wait for a second digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level) delay(4000); // wait for a second }
arkadaşlar sorunu kendi kendime çözüm high ile low ların yerini değiştireyim bakalım ne olacak dedim düzeldi. sorun çözüldü, belki aylar sonra biri bu konuyu görür diye söylüyorum.
KODLAR ;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(300); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
delay(50); // wait for a second
digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(300); // wait for a second
digitalWrite(3, LOW); // turn the LED off by making the voltage LOW
delay(50); // wait for a second
digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(300); // wait for a second
digitalWrite(4, LOW); // turn the LED off by making the voltage LOW
delay(50); // wait for a second
digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level)
delay(300); // wait for a second
digitalWrite(5, LOW); // turn the LED off by making the voltage LOW
delay(50); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
digitalWrite(3, LOW); // turn the LED off by making the voltage LOW
digitalWrite(4, LOW); // turn the LED off by making the voltage LOW
digitalWrite(5, LOW); // turn the LED off by making the voltage LOW
delay(5); // wait for a second
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level)
delay(4000); // wait for a second
}
< Resime gitmek için tıklayın >
< Resime gitmek için tıklayın >
< Resime gitmek için tıklayın >
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye Ol Şimdi DeğilÜye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.