#include <LiquidCrystal_I2C.h>
//#define I2C_ADDR 0x27
//#define LCD_COLUMNS 20
//#define LCD_LINES 4
//LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
LiquidCrystal_I2C lcd(0x27, 16, 2);
int temp = 0;
int hum = 0;
void setup() {
// Init
lcd.init();
lcd.backlight();
}
void loop() {
//lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Temp. : ");
lcd.print(temp);
temp++;
if (temp >=100) {
temp =0;
lcd.clear();
}
lcd.setCursor(0, 1);
lcd.print("Hum. : ");
lcd.print(hum);
hum++;
if (hum >=100) {
hum =0;
lcd.clear();
}
delay(100);
/*
for (int i =0; i <=100; i++) {
lcd.setCursor(8, 0);
lcd.print(i);
lcd.setCursor(8, 1);
lcd.print(i);
delay(200);
}
*/
/*
for (int col =0; col <=16; col++) {
lcd.clear();
lcd.setCursor(col, 0);
lcd.print("Hello");
delay(200);
}
for (int col =16; col >=0; col--) {
lcd.clear();
lcd.setCursor(col, 1);
lcd.print("Hello");
delay(200);
}
*/
}