Page 112 - Proyecto
P. 112

{
                                      pt= analogRead(A5);
                                      lcd.setCursor(5,0);
                                      lcd.println(pt);
                                      if(pt>=1 && pt<=100)
                                      {
                                      digitalWrite(ld1, HIGH);
                                      digitalWrite(ld2, LOW);
                                      digitalWrite(ld3, LOW);
                                      digitalWrite(ld4, LOW);
                                      digitalWrite(ld5, LOW);
                                      digitalWrite(ld6, LOW);
                                      digitalWrite(ld7, LOW);
                                      digitalWrite(ld8, LOW);
                                      digitalWrite(ld9, LOW);
                                       }
                                      else if(pt>=150 && pt<=300)
                                      {
                                      digitalWrite(ld1, HIGH);
                                      digitalWrite(ld2, HIGH);
                                      digitalWrite(ld3, LOW);
                                      digitalWrite(ld4, LOW);
                                      digitalWrite(ld5, LOW);
                                      digitalWrite(ld6, LOW);
                                      digitalWrite(ld7, LOW);
                                      digitalWrite(ld8, LOW);
                                      digitalWrite(ld9, LOW);
                                       }

                                      if(pt>=300 && pt<=400)
                                      {
                                      digitalWrite(ld1, HIGH);
                                      digitalWrite(ld2, HIGH);
                                      digitalWrite(ld3, HIGH);
                                      digitalWrite(ld4, LOW);
                                      digitalWrite(ld5, LOW);
                                      digitalWrite(ld6, LOW);
                                      digitalWrite(ld7, LOW);
                                      digitalWrite(ld8, LOW);
                                      digitalWrite(ld9, LOW);
                                       }
                                      else if(pt>=400 && pt<=550)










                                                          107
   107   108   109   110   111   112   113   114   115   116   117