C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Connect Liquid Sensor With Arduino Mega 2560
WhatsApp
Sr Karthiga
5y
6.9k
4
1
100
Article
liquid.zip
Introduction
In this article, I will explain about connecting the liquid Sensor With Arduino Mega 2560.
It can generally be used to get the measure of the liquid.
Parts Of Lists
Arduino Mega 2560
Liquid Sensor.
Hook Wires.
Liquid Sensor
Liquid level sensors are used for all types of applications.
They are extensively used within automobiles.
Which rely on a substantial amount of different fluids in order to operate to check.
How much gas in the car, windshield washer fluid, oil levels.
Figure 1: Liquid Sensor
Connection
Sensor
Board
Vcc
5V
Gnd
Gnd
Vin
A1
Programming
const
int
sensorPin = 1;
//sensor pin connected to analog pin A1
int
liquid_level;
void
setup()
{
Serial.begin(9600);
//sets the baud rate for data transfer in bits/second
pinMode(sensorPin, INPUT);
//the liquid level sensor will be an input to the arduino
}
void
loop()
{
liquid_level = analogRead(sensorPin);
//arduino reads the value from the liquid level sensor
Serial.println(liquid_level);
//prints out liquid level sensor reading
delay(1000);
//delays 1000ms
}
Explanation
In this Article I explained about the Liquid Sensor
It can be used to find the quality of the liquid which we have.
It can easily print the value in the Serial monitor.
Output
Figure 2: Output
Arduino Mega 2560
Internet of Things
Liquid Sensor
Up Next
Finding Weather Conditions Using Rain Sensor With Arduino Mega 2560
Ebook Download
View all
Raspberry Pi -Sensorial Symphony of Connectivity
Read by 712 people
Download Now!
Learn
View all
Aditya Reddy
NA
274
25.7k
SharePoint developer since 8 years
https://www.c-sharpcorner.com/members/adithya-reddy
Don’t miss Aditya Reddy’s next
Aditya Reddy
0
274
25.7k
+
Follow
(
4
) Comments
View All Comments
Press Esc key to cancel
Load More
Message
Membership not found