Clase 13 - 23/09/2020

 23 de Septiembre del 2020

Estos dos dias (23 y 22 de Septiembre) hemos realizado las conexiones y completar el circuito


void setup()
{
  Serial.begin(9600);
  pinMode(A0,INPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  
}

void loop()
{
  valor = analogRead(A0);
  Serial.println(valor);
  if(valor >100)  
    digitalWrite(8, HIGH);
  else if(valor >300)
  digitalWrite(9, LOW);
  
    
    
    /*delay(1000); // Wait for 1000 millisecond(s)
  }

  {
  digitalWrite(9, HIGH);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(9, LOW);
  delay(1000); // Wait for 1000 millisecond(s)
  }
  {
  digitalWrite(10, HIGH);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(10, LOW);
  delay(1000); // Wait for 1000 millisecond(s)
  }
  {
  digitalWrite(11, HIGH);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(11, LOW);
  delay(1000); // Wait for 1000 millisecond(s)
  }*/
}

Comentarios