Connect Liquid Sensor With Arduino Mega 2560
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;
- int liquid_level;
- void setup()
- {
- Serial.begin(9600);
- pinMode(sensorPin, INPUT);
- }
- void loop()
- {
- liquid_level = analogRead(sensorPin);
- Serial.println(liquid_level);
- delay(1000);
- }
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.