Page 52 - Trabajo final
P. 52

digitalWrite (ld2, LOW);

                      digitalWrite (ld3, LOW);

                      Serial.println("cm");

                      Serial.print(d);

                    }

                    if (d <150)



                      {


                     digitalWrite (ld1, HIGH);

                      delay(1);

                      digitalWrite (ld2, LOW);

                      digitalWrite (ld3, LOW);

                      Serial.println("cm");

                      Serial.print(d);



                    }



                     if (d<100)




                      {



                  digitalWrite (ld1, HIGH);

                  digitalWrite (ld2, HIGH);

                  delay(1);

                  digitalWrite (ld3, LOW);

                  Serial.println("cm");

                  Serial.print(d);
   47   48   49   50   51   52   53   54   55   56   57