20/11/2019

Hoy terminamos la programación que ya habíamos empesador hace dos clases ya que la clase pasada hicimos el informe. 

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11, 5,4, 3,2);
int Pinfotocelda=A0;
int Pinhumedad= A1;
void setup() {
 lcd.begin(16, 2);
 pinMode(Pinfotocelda, INPUT);
 pinMode(Pinhumedad,INPUT);
}

void loop() {
int valor= analogRead (Pinfotocelda);
lcd.print (valor);
int valorh= analogRead (Pinhumedad);
lcd.print (valorh);
lcd.setCursor(0,0);
lcd.print("Humedad:   ");
lcd.print(valorh);
lcd.setCursor(1,1);
lcd.print("luz:   ");
lcd.print(valor);
}
Resultado de imagen para programacion

Comentarios