#include <DHT.h>
#define DHTTYPE DHT22
#define DHTPIN 2
#include <LiquidCrystal.h>
//LiquidCrystal(rs, enable, d4, d5, d6, d7)
LiquidCrystal lcd(22, 27, 4, 18, 19, 15);
float dht_vlaga;
int dht_vlaga_int;
float dht_temperatura;
DHT dht(DHTPIN, DHTTYPE);

#define tipka 34
#define led 23
#define tipka1 13
#define led1 14
bool izbira = 0;
int sprememba;

void setup() { 
  lcd.begin(16, 2);
  lcd.clear();
  dht.begin();
  pinMode(tipka, INPUT);
  pinMode(led, OUTPUT);
  pinMode(tipka1, INPUT);
  pinMode(led1, OUTPUT);  
  ROK();
}

void loop() {
  sprememba = digitalRead(tipka1);
  
  if(sprememba == LOW){
    izbira = !izbira;
    delay(500);
  }

  if(izbira == 1){
    digitalWrite(led1, HIGH);
  }


  if(izbira == 0){
    DHT22_LCD();
  }

  if(izbira == 1){
    STOPARICA();
  }
  
  

}