0% found this document useful (0 votes)
20 views3 pages

Iot 9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Iot 9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment - 9

Student Name: Sahil Singh UID: 23BCS80031


Branch: CSE Section/Group: 610/B
Semester: 5th Date of Performance: 14/10/2024
Subject Name: Internet of Thing (IOT) Subject Code: 22CSP-329

Aim: To develop an IOT-based system to optimize agricultural practices.

Objective: Develop an IOT-based system to optimize agricultural practices by


leveraging real-time data collection and analysis to monitor soil health, weather
conditions, and crop growth, ultimately enhancing productivity, reducing resource
waste, and promoting sustainable farming practices.

Input/Apparatus Used:

1. 1 × Arduino Uno board


2. 1 × Soil moisture sensor
3. 1 × Breadboard
4. 4 × Jumper wires
5. 1×USB cable for
Arduino
6. 1×Computer with
Arduino IDE installed

Procedure:

Setup the Arduino and Sensor Gather Components:


• Ensure you have all the necessary components.
• Connect the Soil Moisture Sensor to the Arduino:
• VCC (Power): Connect the VCC pin of the soil moisture sensor to the 5V pin on the Arduino.
• GND (Ground): Connect the GND pin of the soil moisture sensor to a GND pin on the Arduino.
• Analog Output (A0): Connect the A0 pin of the soil moisture sensor to an analog input pin (e.g.,
A0) on the Arduino.

Department of Computer Science & Engineering 1


Connections: This is the Circuit connection for the to optimize agricultural practices by using
Arduino.

• Sensor Connections
• Communication Protocols.
• Data Processing Unit.
• User Interface

Fig 1.1 – Connections required to optimize agricultural practices by using Arduino.

CODE:

// Define the pin connected to the soil moisture sensor


const int sensorPin = A0;
void setup()
{
// Initialize serial communication at 9600 bits per second
Serial.begin(9600);
}
void loop()
{
// Read the value from the soil moisture sensor

Department of Computer Science & Engineering 2


int sensorValue = analogRead(sensorPin);
// Print the sensor value to the serial monitor
Serial.print("Soil Moisture Value: ");
Serial.println(sensorValue);
// Wait for a second before taking another reading
delay(1000);
}

Result:

Fig 1.2 – Using Soil moisture sensor for agricultural practices.

Conclusion:

By completing this experiment, you have successfully interfaced a soil moisture sensor with an Arduino
board, measured soil moisture levels, and interpreted the sensor readings. This knowledge can be
applied to automate irrigation systems in agriculture.

Department of Computer Science & Engineering 3

You might also like