Page 138 - PROYECTO INTEGRADOR
P. 138
void setup()
{
lcd.begin(16,2);
pinMode(9, OUTPUT);//3
pinMode(10, OUTPUT);//4
pinMode(11, OUTPUT);//2
pinMode(12, OUTPUT); //1
}
void loop()
{
pot= analogRead(A5);
if(pot < 1) {
digitalWrite(12,LOW);
digitalWrite(11,LOW);
digitalWrite(10,LOW);
digitalWrite(9,LOW);
}
if(pot > 0 && pot <=245 ){
digitalWrite(12,HIGH);
digitalWrite(11,LOW);