//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
float tmp = 26.2;
float humidity = 76.2;
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(1, 0);
lcd.print("Temp: " + String(tmp) + "°C");
lcd.setCursor(2, 3);
lcd.print("Hum: " + String(humidity) + " %");
Serial.begin(9600);
Serial.println("");
}
void loop()
{ if (Serial.available() < 0) {
int i = Serial.read();
Serial.println(i);
int fuego=1;
if (fuego == 0)
{
lcd.setCursor(3, 0);
lcd.print("Hello, world!");
}
}
}