Mahamudul Karim Khondaker
Published © CC0

Rainfall Measured Using Arduino

Here we measure rainfall.

BeginnerShowcase (no instructions)6,673
Rainfall Measured Using Arduino

Things used in this project

Story

Read more

Schematics

arduino-liquid-level-sensor-circuit_7rAv7vIrSO.png

Code

Arduino Code

Arduino
https://plus.google.com/u/0/+MahamudulKarimKhondaker/posts/ibnrPXt8ePR
#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup () {
  // initialize serial communication at 9600 bits per second:
  Serial.begin (9600);}
void loop() {
  // read the input on analog pin 0:
  int value = analogRead(A0);
  lcd.setCursor(0, 7);
  if (value > 500) {
    Serial.println("Very heavy Rain");
    lcd.print("Very heavy rain");}
  else if ((value > 300) && (value <= 500)) {
    Serial.println("AVERAGE Rain");
lcd.print("Average Rain");
lcd.print("       "); }
  else{
    Serial.println("Dry Weather");
    lcd.print("Dry Wather");
    lcd.print("          ");}
  delay(100);}

Credits

Mahamudul Karim Khondaker

Mahamudul Karim Khondaker

43 projects • 76 followers
Completed BSc at Electrical & Electronic Engineering (EEE) From United International University. Dhaka, Bangladesh

Comments