Arduino Gaz Bulucu Robot

20160527_143132

 

 

 

 

 

 

 

 

 

Pic ile yapmış olduğum özgün robotlarımı arduinoya da uyarlamak istedim sırada gaz bulucu robotum var.Okullarda arduino şartı olan robotlar için bu robotu da arduino ya uyarladım.

Kullanılan Malzemeler:

  • Arduino Uno
  • MQ gaz sensörü
  • Engel Algılama Sensörü
  • Motor Sürücü kartı

 

Arkadaşlar bildiğiniz üzere benim robotlarımda tamamen hazır devreler kullanmak yerine bazı devre kartlarını kendim üretiyorum.Bunun amacı hem sizden gelen istekler bu yönde hemde birazda işçilik olsun emek olsun istiyorum robotlarımda.Ayrıca üni deki hocalarımızın bazıları bunu şart koşuyor.

Arduino gaz bulucu robotumuz ön tarafta bulunan 3 yönlü engel algılayan sensör sayesinde engellere çarpmadan yoluna devam eder.Bu esnada led lerle engel uyarsı verir.Ve gaza sensörü ile ortamda gaz olup olmadığını kontrol eder.Ortamda gezerken gaza maruz kalırsa robot hareketini sonlandırır, ses ve ışık ile ikaz verir.Bu zaman gaza müdahale edile kadar devam eder.Ortamdan gaz temizlenince robot tekrar ortamda dolaşmaya devam eder.

 

 

ard gaz devre şeması

gaz kaçak 3d

gaz motor sürücü baskı devre

 

 

 

20160524_114632 20160524_114638 20160527_143132 20160527_143211


int gazState = 0;
int solengelState = 0; // variable for reading the pushbutton status
int sagengelState = 0;
void setup() {
// initialize the LED pin as an output:
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
pinMode(3, INPUT);
pinMode(2, INPUT);

pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, INPUT);
digitalWrite(11, HIGH);

}

void loop() {
// read the state of the pushbutton value:
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (300);
digitalWrite(8, HIGH);
digitalWrite(6, LOW);
delay (300);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (300);
digitalWrite(8, HIGH);
digitalWrite(6, LOW);
delay (300);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (300);
digitalWrite(8, HIGH);
digitalWrite(6, LOW);
delay (300);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (300);
digitalWrite(8, HIGH);
digitalWrite(6, HIGH);
delay (300);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (300);
digitalWrite(8, HIGH);
digitalWrite(6, HIGH);
delay (300);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (300);
digitalWrite(8, HIGH);
digitalWrite(6, HIGH);
delay (300);

digitalWrite(5, LOW);
while (1){
solengelState = digitalRead(2);
sagengelState = digitalRead(3);
gazState = digitalRead(5);
digitalWrite(8, LOW);
digitalWrite(6, LOW);
if(gazState == LOW)
{digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(12, LOW);
digitalWrite(13, LOW);
digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);
digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);
digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);
digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
delay (100);

digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay (100);
}
if (solengelState == LOW && sagengelState == LOW ) {

digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);

digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
delay (10);
}
if (solengelState == HIGH && sagengelState == LOW ) {

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (250);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (250);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (250);
digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (250);

}

if (solengelState == LOW && sagengelState == HIGH ) {

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (250);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (250);

digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
delay (250);
digitalWrite(7, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
delay (100);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
delay (250);

}
if (solengelState == HIGH && sagengelState == HIGH ) {

digitalWrite(7, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (500);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay (500);

}

}}

 

 

Sosyal Medyada Paylaş Facebook Twitter Google+

Etiketler: , , ,
Eklenme Tarihi: 28 Haziran 2016

Konu hakkında yorumunuzu yazın

Arduino Gaz Bulucu Robot (1 Yorum)

HOŞ GELDİNİZ

Youtube kanalıma Abone Olabilirsiniz.