SlideShare a Scribd company logo
1 of 10
AUTO PLANT IRRIGATION
Using PIC Module
Objective
The project aims to design an automated plant irrigation system leveraging a PIC
microcontroller. Its primary objective is to create a smart and efficient solution
for maintaining optimal soil moisture levels in plants by automating the watering
process based on real-time environmental data.
Componets and Methology
PIC Microcontroller: Utilize the PIC microcontroller to manage and control the
irrigation system's functionalities, integrating sensor data processing and
decision-making algorithms.
Soil Moisture Sensors: Implement moisture sensors to continuously monitor soil
moisture content.
Water Dispensing Mechanism: Develop a controlled water dispensing mechanism
that operates based on data received from the sensors and microcontroller.
Programming: Create software to enable the microcontroller to collect and
process sensor data, deciding when and how much water to dispense.
Power Management: Design a power system ensuring reliable and consistent
operation.
Expected Outcome
Upon successful implementation, the system will automatically regulate plant
watering by responding to real-time soil moisture levels. It will prevent both
over-watering and under-watering, thereby promoting healthy plant growth.
Benefits
Water Conservation: Efficiently uses water by providing it only when necessary,
reducing waste.
Convenience: Offers a hassle-free solution for plant care, especially beneficial
for individuals with busy schedules.
Optimized Plant Health: Ensures plants receive the right amount of water,
enhancing their overall health and vitality.
Principle of Operation
1. Soil Moisture Sensing:
Soil moisture sensors (like resistive or capacitive sensors) are embedded in the soil.
These sensors measure the moisture content in the soil, generating analog or digital data.
The PIC microcontroller collects and processes this data.
2. Decision Making:
The microcontroller compares the moisture data with pre-defined thresholds to determine if the
plants need watering.
If soil moisture falls below the set threshold, the microcontroller triggers the watering
mechanism.
3. Water Dispensing Mechanism:
Upon receiving the signal from the microcontroller, a water dispensing mechanism (such as a
pump or valve) is activated.
Water is dispensed onto the soil to rehydrate the plants.
Project Connection
1. Soil Moisture Sensor Connection:
The sensors are inserted into the soil at strategic points around the plant roots.
Analog or digital signal outputs from these sensors are connected to the
analog/digital input pins of the PIC microcontroller.
2. Water Dispensing Mechanism Connection:
A water pump or valve is connected to an output pin of the PIC microcontroller.
The microcontroller controls this output pin to activate/deactivate the water
dispensing mechanism based on moisture sensor data.
Connection…
3. Power Supply:
The PIC microcontroller and associated components require a stable power
supply. A power source, such as a battery or external power adapter, is connected
to the microcontroller and other circuit components.
4. Programming Interface:
The PIC microcontroller is programmed using appropriate software tools (like
MPLAB or Arduino IDE), enabling it to read sensor data, process information, and
control the watering mechanism.
Project Code and Block Diagram
Proteus Simulation

More Related Content

Similar to AUTOMATIC PLANT IRRIGATION SYSTEM WITH PID MODULE.pptx

An IOT Based Smart Irrigation System Using Soil Moisture And Weather Prediction
An IOT Based Smart Irrigation System Using Soil Moisture And Weather PredictionAn IOT Based Smart Irrigation System Using Soil Moisture And Weather Prediction
An IOT Based Smart Irrigation System Using Soil Moisture And Weather PredictionJose Katab
 
Irrigation IoT G22222.ppt
Irrigation IoT G22222.pptIrrigation IoT G22222.ppt
Irrigation IoT G22222.pptWajdi Bellil
 
Wireless sensor network for monitoring irrigation using XBee Pro S2C
Wireless sensor network for monitoring irrigation using XBee Pro S2CWireless sensor network for monitoring irrigation using XBee Pro S2C
Wireless sensor network for monitoring irrigation using XBee Pro S2CjournalBEEI
 
Implementation of soil energy harvesting system for agriculture parameters mo...
Implementation of soil energy harvesting system for agriculture parameters mo...Implementation of soil energy harvesting system for agriculture parameters mo...
Implementation of soil energy harvesting system for agriculture parameters mo...IRJET Journal
 
Smart Agriculture and Farming
Smart Agriculture and FarmingSmart Agriculture and Farming
Smart Agriculture and FarmingSUVIKRAM PRADHAN
 
A sensing approach for automated and real-time crop prediction in the scope o...
A sensing approach for automated and real-time crop prediction in the scope o...A sensing approach for automated and real-time crop prediction in the scope o...
A sensing approach for automated and real-time crop prediction in the scope o...bijejournal
 
development of smart automated irrigation system
development of smart automated irrigation systemdevelopment of smart automated irrigation system
development of smart automated irrigation systemIJEAB
 
madhu pptx.pptx
madhu pptx.pptxmadhu pptx.pptx
madhu pptx.pptxDivyaU22
 
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEMSENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEMJournal For Research
 
Review on microcontroller based monitoring system for agriculture
Review on microcontroller based monitoring system for agricultureReview on microcontroller based monitoring system for agriculture
Review on microcontroller based monitoring system for agricultureIRJET Journal
 
A Futuristic Approach for Smart Farming using IoT and ML
A Futuristic Approach for Smart Farming using IoT and MLA Futuristic Approach for Smart Farming using IoT and ML
A Futuristic Approach for Smart Farming using IoT and MLIRJET Journal
 
IRJET- Smart Drip Irrigation System using IoT
IRJET- Smart Drip Irrigation System using IoTIRJET- Smart Drip Irrigation System using IoT
IRJET- Smart Drip Irrigation System using IoTIRJET Journal
 
Design of a micro controller based automatic home garden watering system (aut...
Design of a micro controller based automatic home garden watering system (aut...Design of a micro controller based automatic home garden watering system (aut...
Design of a micro controller based automatic home garden watering system (aut...tapiwa chikwenya
 
Automation in micro irrigation kvg
Automation in micro irrigation kvgAutomation in micro irrigation kvg
Automation in micro irrigation kvgkaushal gadariya
 
Bring technology into Agriculture.pptx
Bring technology into Agriculture.pptxBring technology into Agriculture.pptx
Bring technology into Agriculture.pptxbaysahcmjames2kblax
 
Smart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptxSmart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptxNehaChaudhary730890
 
IRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using ArduinoIRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using ArduinoIRJET Journal
 
IoT enabled automatic aquaponics system
IoT enabled automatic aquaponics systemIoT enabled automatic aquaponics system
IoT enabled automatic aquaponics systemNishmi Suresh
 
Design and implementation of iot based smart irrigation system.pptx
Design and implementation of iot  based smart irrigation system.pptxDesign and implementation of iot  based smart irrigation system.pptx
Design and implementation of iot based smart irrigation system.pptxamrsonarbangla
 
https://twitter.com/ijcseajournal1/status/1514111418504658944
https://twitter.com/ijcseajournal1/status/1514111418504658944https://twitter.com/ijcseajournal1/status/1514111418504658944
https://twitter.com/ijcseajournal1/status/1514111418504658944IJCSEA Journal
 

Similar to AUTOMATIC PLANT IRRIGATION SYSTEM WITH PID MODULE.pptx (20)

An IOT Based Smart Irrigation System Using Soil Moisture And Weather Prediction
An IOT Based Smart Irrigation System Using Soil Moisture And Weather PredictionAn IOT Based Smart Irrigation System Using Soil Moisture And Weather Prediction
An IOT Based Smart Irrigation System Using Soil Moisture And Weather Prediction
 
Irrigation IoT G22222.ppt
Irrigation IoT G22222.pptIrrigation IoT G22222.ppt
Irrigation IoT G22222.ppt
 
Wireless sensor network for monitoring irrigation using XBee Pro S2C
Wireless sensor network for monitoring irrigation using XBee Pro S2CWireless sensor network for monitoring irrigation using XBee Pro S2C
Wireless sensor network for monitoring irrigation using XBee Pro S2C
 
Implementation of soil energy harvesting system for agriculture parameters mo...
Implementation of soil energy harvesting system for agriculture parameters mo...Implementation of soil energy harvesting system for agriculture parameters mo...
Implementation of soil energy harvesting system for agriculture parameters mo...
 
Smart Agriculture and Farming
Smart Agriculture and FarmingSmart Agriculture and Farming
Smart Agriculture and Farming
 
A sensing approach for automated and real-time crop prediction in the scope o...
A sensing approach for automated and real-time crop prediction in the scope o...A sensing approach for automated and real-time crop prediction in the scope o...
A sensing approach for automated and real-time crop prediction in the scope o...
 
development of smart automated irrigation system
development of smart automated irrigation systemdevelopment of smart automated irrigation system
development of smart automated irrigation system
 
madhu pptx.pptx
madhu pptx.pptxmadhu pptx.pptx
madhu pptx.pptx
 
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEMSENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
 
Review on microcontroller based monitoring system for agriculture
Review on microcontroller based monitoring system for agricultureReview on microcontroller based monitoring system for agriculture
Review on microcontroller based monitoring system for agriculture
 
A Futuristic Approach for Smart Farming using IoT and ML
A Futuristic Approach for Smart Farming using IoT and MLA Futuristic Approach for Smart Farming using IoT and ML
A Futuristic Approach for Smart Farming using IoT and ML
 
IRJET- Smart Drip Irrigation System using IoT
IRJET- Smart Drip Irrigation System using IoTIRJET- Smart Drip Irrigation System using IoT
IRJET- Smart Drip Irrigation System using IoT
 
Design of a micro controller based automatic home garden watering system (aut...
Design of a micro controller based automatic home garden watering system (aut...Design of a micro controller based automatic home garden watering system (aut...
Design of a micro controller based automatic home garden watering system (aut...
 
Automation in micro irrigation kvg
Automation in micro irrigation kvgAutomation in micro irrigation kvg
Automation in micro irrigation kvg
 
Bring technology into Agriculture.pptx
Bring technology into Agriculture.pptxBring technology into Agriculture.pptx
Bring technology into Agriculture.pptx
 
Smart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptxSmart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptx
 
IRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using ArduinoIRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using Arduino
 
IoT enabled automatic aquaponics system
IoT enabled automatic aquaponics systemIoT enabled automatic aquaponics system
IoT enabled automatic aquaponics system
 
Design and implementation of iot based smart irrigation system.pptx
Design and implementation of iot  based smart irrigation system.pptxDesign and implementation of iot  based smart irrigation system.pptx
Design and implementation of iot based smart irrigation system.pptx
 
https://twitter.com/ijcseajournal1/status/1514111418504658944
https://twitter.com/ijcseajournal1/status/1514111418504658944https://twitter.com/ijcseajournal1/status/1514111418504658944
https://twitter.com/ijcseajournal1/status/1514111418504658944
 

Recently uploaded

Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological universityMohd Saifudeen
 
AI in Healthcare Innovative use cases and applications.pdf
AI in Healthcare Innovative use cases and applications.pdfAI in Healthcare Innovative use cases and applications.pdf
AI in Healthcare Innovative use cases and applications.pdfmahaffeycheryld
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2T.D. Shashikala
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailingAshishSingh1301
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.MdManikurRahman
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsVIEW
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdfKamal Acharya
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfJNTUA
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)NareenAsad
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Nitin Sonavane
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...IJECEIAES
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemSampad Kar
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxMANASINANDKISHORDEOR
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docxrahulmanepalli02
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 

Recently uploaded (20)

Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university
 
AI in Healthcare Innovative use cases and applications.pdf
AI in Healthcare Innovative use cases and applications.pdfAI in Healthcare Innovative use cases and applications.pdf
AI in Healthcare Innovative use cases and applications.pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 

AUTOMATIC PLANT IRRIGATION SYSTEM WITH PID MODULE.pptx

  • 2. Objective The project aims to design an automated plant irrigation system leveraging a PIC microcontroller. Its primary objective is to create a smart and efficient solution for maintaining optimal soil moisture levels in plants by automating the watering process based on real-time environmental data.
  • 3. Componets and Methology PIC Microcontroller: Utilize the PIC microcontroller to manage and control the irrigation system's functionalities, integrating sensor data processing and decision-making algorithms. Soil Moisture Sensors: Implement moisture sensors to continuously monitor soil moisture content. Water Dispensing Mechanism: Develop a controlled water dispensing mechanism that operates based on data received from the sensors and microcontroller. Programming: Create software to enable the microcontroller to collect and process sensor data, deciding when and how much water to dispense. Power Management: Design a power system ensuring reliable and consistent operation.
  • 4. Expected Outcome Upon successful implementation, the system will automatically regulate plant watering by responding to real-time soil moisture levels. It will prevent both over-watering and under-watering, thereby promoting healthy plant growth.
  • 5. Benefits Water Conservation: Efficiently uses water by providing it only when necessary, reducing waste. Convenience: Offers a hassle-free solution for plant care, especially beneficial for individuals with busy schedules. Optimized Plant Health: Ensures plants receive the right amount of water, enhancing their overall health and vitality.
  • 6. Principle of Operation 1. Soil Moisture Sensing: Soil moisture sensors (like resistive or capacitive sensors) are embedded in the soil. These sensors measure the moisture content in the soil, generating analog or digital data. The PIC microcontroller collects and processes this data. 2. Decision Making: The microcontroller compares the moisture data with pre-defined thresholds to determine if the plants need watering. If soil moisture falls below the set threshold, the microcontroller triggers the watering mechanism. 3. Water Dispensing Mechanism: Upon receiving the signal from the microcontroller, a water dispensing mechanism (such as a pump or valve) is activated. Water is dispensed onto the soil to rehydrate the plants.
  • 7. Project Connection 1. Soil Moisture Sensor Connection: The sensors are inserted into the soil at strategic points around the plant roots. Analog or digital signal outputs from these sensors are connected to the analog/digital input pins of the PIC microcontroller. 2. Water Dispensing Mechanism Connection: A water pump or valve is connected to an output pin of the PIC microcontroller. The microcontroller controls this output pin to activate/deactivate the water dispensing mechanism based on moisture sensor data.
  • 8. Connection… 3. Power Supply: The PIC microcontroller and associated components require a stable power supply. A power source, such as a battery or external power adapter, is connected to the microcontroller and other circuit components. 4. Programming Interface: The PIC microcontroller is programmed using appropriate software tools (like MPLAB or Arduino IDE), enabling it to read sensor data, process information, and control the watering mechanism.
  • 9. Project Code and Block Diagram

Editor's Notes

  1. sbit LCD_RS at RD0_bit; sbit LCD_EN at RD1_bit; sbit LCD_D4 at RD2_bit; sbit LCD_D5 at RD3_bit; sbit LCD_D6 at RD4_bit; sbit LCD_D7 at RD5_bit; sbit LCD_RS_Direction at TRISD0_bit; sbit LCD_EN_Direction at TRISD1_bit; sbit LCD_D4_Direction at TRISD2_bit; sbit LCD_D5_Direction at TRISD3_bit; sbit LCD_D6_Direction at TRISD4_bit; sbit LCD_D7_Direction at TRISD5_bit; // End LCD module connections double source=0; double temp=0; int view=0; char txt[6]; void main() { TRISC = 0x00; PORTC = 0x00; ADC_Init(); // Initialize ADC Lcd_Init(); // Initialize LCD Lcd_Cmd(_LCD_CLEAR); // Clear display Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off // clear LCD Lcd_Out(1, 1, " EEE 332 "); Lcd_Out(2, 1, " ABDUR ROUF "); delay_ms(2000); Lcd_Cmd(_LCD_CLEAR); Lcd_Out(1, 1, " SOIL MOISTURE "); Lcd_Out(2, 1, " MICROCONTROLLER"); delay_ms(2000); Lcd_Cmd(_LCD_CLEAR); // Clear display // char code for degree // Display "C" for Celsius while(1) { source=Adc_Read(1); if(source>600) { PORTC = 0b11111101; //motor on delay_ms(500); Lcd_Cmd(_LCD_CLEAR); Lcd_Out(1,5, "Dry Soil"); Lcd_Out(2,5, "Motor On"); } if(source<=600) { PORTC = 0b00000000; delay_ms(500); //motor on Lcd_Cmd(_LCD_CLEAR); Lcd_Out(1,5, "Humid Soil"); Lcd_Out(2,5, "Motor OFF"); } } }