The code and short description of this project is shown below . Since we have used lcd.h library which consists lcd.c and lcd.h file . we have to modify a little bit inside lcd.h file first of all you can download this file from this link lcd library for avr
A moisture sensor is interfaced on PORTA PINO . from which this sensor sense the moisture that is present on soil and if the moisture is reached below the critical point then motor will be turned on and if moisture is high the motor is turned off . It seems like i have did wrong program ? yes i did . You can correct it by yourself .This is reference for to make actual soil moisture meter please see this link
First of all include standard avr/io library and then lcd library . You can download lcd library from this link . Since we have used 16*2 alphanumeric LCD display we have to do some modification on lcd.h file . Open lcd.h file and scroll down slowly until you reach .
#define LCD_LINES 4 /**< number of visible lines of the display */
if there is 4 instead of 2 please make it 2 because we are using two line lcd
again scroll down until you reach
#define LCD_PORT PORTB /**< port for the LCD lines */
if there is PORTA change it to PORTB
because we are using 2 line display on PORTB .
The whole project can be download from this link automatic watering using atmega32
Please ! share this project