Page 52 - Tasarım Odaklı Düşünme ile Proje Hazırlama
P. 52

digitalWrite (greenLed1, HIGH);
                                                        digitalWrite (redLed2, HIGH);
                                                        digitalWrite (yellowLed1, LOW);
                                                        digitalWrite (yellowLed2, LOW);
                                                        digitalWrite (greenLed2, LOW);
                                                        digitalWrite (redLed1, LOW);
                                                        delay(10000);


                                                        digitalWrite (yellowLed1, HIGH);
                                                        digitalWrite (yellowLed2, HIGH);
                                                        digitalWrite (redLed1, LOW);
                                                        digitalWrite (redLed2, LOW);
                                                        digitalWrite (greenLed2, LOW);
                                                        digitalWrite (greenLed1, LOW);
                                                        delay(2000);

                                                        digitalWrite (greenLed2, HIGH);
                                                        digitalWrite (redLed1, HIGH);
                                                        digitalWrite (yellowLed1, LOW);
                                                        digitalWrite (yellowLed2, LOW);
                                                        digitalWrite (greenLed1, LOW);
                                                        digitalWrite (redLed2, LOW);
                                                        delay (5000);
                                                                }
                                                          else if ((mesafe2<=50) && (mesafe1>=130) )
                                                                {
                                                        Serial.println ("2.Bolge Yogun Trafik...");
                                                        digitalWrite (greenLed1, HIGH);
                                                        digitalWrite (redLed2, HIGH);
                                                        digitalWrite (yellowLed1, LOW);
                                                        digitalWrite (yellowLed2, LOW);
                                                        digitalWrite (greenLed2, LOW);
                                                        digitalWrite (redLed1, LOW);
                                                        delay(5000);


                                                        digitalWrite (yellowLed1, HIGH);
                                                        digitalWrite (yellowLed2, HIGH);
                                                        digitalWrite (redLed1, LOW);
                                                        digitalWrite (redLed2, LOW);
                                                        digitalWrite (greenLed2, LOW);
                                                        digitalWrite (greenLed1, LOW);
                                                        delay(2000);

                                                        digitalWrite (greenLed2, HIGH);
                                                        digitalWrite (redLed1, HIGH);
                                                        digitalWrite (yellowLed1, LOW);
                                                        digitalWrite (yellowLed2, LOW);
                                                        digitalWrite (greenLed1, LOW);
                                                        digitalWrite (redLed2, LOW);


 50                                                                                                   51
   47   48   49   50   51   52   53   54   55   56   57