Page 81 - PROYECTO INTEGRADOR
P. 81

Serial.println(d);

                    Serial.println("cm");

                    delay(50);


                    if(dt==HIGH)

                    {

                         digitalWrite(leds, HIGH);

                  }


                    else

                    {

                           digitalWrite(leds, LOW);



                    }




                    if(d<50)

                    {

                       digitalWrite(led1, HIGH);


                       digitalWrite(led2, HIGH);

                       digitalWrite(led3, HIGH);

                       tone(buz,1000,10);

                    }


                    else if(d<100)

                      {

                       digitalWrite(led1, HIGH);

                       digitalWrite(led2, HIGH);

                       digitalWrite(led3, LOW);


                       noTone(buz);
   76   77   78   79   80   81   82   83   84   85   86