#include <LiquidCrystal_I2C.h>
#define ENCODER_CLK_PIN A1
#define ENCODER_DT_PIN A2
#define ENCODER_SW_PIN A3
#define LCD_COL 16
#define LCD_ROW 2
LiquidCrystal_I2C lcd(0x27, LCD_COL, LCD_ROW);
volatile byte days = 15;
float Temperature = 38.2;
float Humidity = 60.0;
byte currentBird = 0;
String listBird[6] = { "CHICK", "QUAIL", "DUCK ", "MUSKUS", "PEREPEL", "TURKEY" };
byte listBirdPeriod[6] = { 21, 17, 28, 21, 30, 28 };
void setup() {
lcd.init(); // Инициируем работу с LCD дисплеем
lcd.backlight(); // Включаем подсветку LCD дисплея
char LCDmsg[16];
lcd.setCursor(0, 0);
sprintf(LCDmsg, "%s ", listBird[currentBird].c_str());
lcd.print(LCDmsg);
lcd.setCursor(9, 0);
sprintf(LCDmsg, "%2d|2|%02d", days, listBirdPeriod[currentBird]);
lcd.print(LCDmsg);
lcd.setCursor(0, 1);
sprintf(LCDmsg, "\x07%02d|2|%02d", days, listBirdPeriod[currentBird]);
lcd.print("\x07");
lcd.print(Temperature, 1);
lcd.print("\xDF""C \x08");
lcd.print(Humidity, 1);
lcd.print("%RH");
}
void loop() {
// put your main code here, to run repeatedly:
}