#include <Wire.h>
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h>
int pinPump = digitalRead(6);
hd44780_I2Cexp chanwoolcd;
void setup() {
// put your setup code here, to run once:
chanwoolcd.init();
chanwoolcd.backlight();
pinMode(pinPump, OUTPUT);
digitalWrite(pinPump, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
int soil = analogRead(A0);
int humanity = analogRead(A1);
int pinPump = digitalRead(6);
chanwoolcd.clear();
chanwoolcd.setCursor(0,0);
chanwoolcd.print("soil : ");
chanwoolcd.setCursor(7,0);
chanwoolcd.print(soil);
chanwoolcd.setCursor(0,1);
chanwoolcd.print("humanity: ");
chanwoolcd.setCursor(9,1);
chanwoolcd.print(humanity);
delay(250);
if (soil>750);
digitalWrite(pinPump,HIGH);
delay(250);
else (soil<750);
digitalWrite(pinPump,LOW );
delay(250);
}