Skip to content

Instantly share code, notes, and snippets.

@HectorTorres
Created May 11, 2017 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HectorTorres/7f1e6f99f86cc4ffa4a4f410cd8ecaf3 to your computer and use it in GitHub Desktop.
Save HectorTorres/7f1e6f99f86cc4ffa4a4f410cd8ecaf3 to your computer and use it in GitHub Desktop.
lcd i2c con Arduino UNO
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup()
{
Serial.begin(57600);
lcd.begin();
lcd.setCursor (0,0) ;lcd.print("Valor del sensor ");
lcd.setCursor (0,2) ;lcd.print(" HETPRO ");
lcd.setCursor (0,3) ;lcd.print("www.hetpro-store.com");
}
void loop()
{
Serial.print("Valor del sensor de Humedad:");
Serial.println(analogRead(0));
lcd.setCursor (0,1) ;lcd.print("                ");
lcd.setCursor (8,1) ;lcd.print(analogRead(0));
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment