Water Me:
Designed to promote plant health and sustainability by measuring the temperature and humidity levels of the environment in close proximity to its habitat. Without the availability of a soil moisture sensor, the DHT11 serves as a viable option to make my world a better place by giving me a reminder to water my plants using the LCD when the temperature or humidity reaches a certain customizable threshold.
This project helps users keep a visual reminder of the needs of their plants. With more time it would be possible to provide housing that matches the aesthetic of my bedroom or plants, along with a portability system to detach it from my laptop.
Make something that makes the world a better place for yourself or for someone else using an analogue or digital techniques - or a combination of both. Think about the meaning of what you make, how it will be used, the colours you choose, the design of your device, who would use it, why, where would it be used, what materials did you use to make it, what does it make people feel, how does it make the world a better place? Use at least one electrical INPUT and at least one electrical OUTPUT.
#include "DHT.h"
#include <LiquidCrystal.h>
//include DHT Library that I installed
//define a constant which is the sensor we are using
#define Type DHT11
//connect the DHT to pin 2 (left most wire is to pin 2)
//(middle wire is Red to 5v)
//(right most wire is black to ground)
int sensePin=2;
//pins on LCD
int rs=7;
int en=8;
int d4=9;
int d5=10;
int d6=11;
int d7=12;
//lcd display
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
DHT HT(sensePin, Type);
//use floats as temperature is'nt an int
float humidity;
float tempCel;
float tempFar;
//delay for safety
int setTime=500;
//define constant threshold for plant to need water
const int humidityThreshold = 67;
//int dt= 1000;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
HT.begin();
delay(setTime); //Create a delay before the loop begins for safety
//number of displays we have
lcd.begin(16,2);
}
void loop() {
//TESTING THE LCD
// lcd.setCursor(0,0);
// lcd.print("Hello Grace! ");
//read and loop temps
humidity=HT.readHumidity();
tempC=HT.readTemperature();
tempF=HT.readTemperature(true); //true to read in F
//Print the Temp And Hu to the LCD
lcd.setCursor(0,0);
lcd.print ("Temp C= ");
lcd.print (tempCel);
lcd.print((char)223); //print degree symbol
lcd.setCursor(0,2);
lcd.print("Humidity= ");
lcd.print(humidity);
lcd.println("% ");
delay(2000);
lcd.clear();
if(humidity< humidityThreshold) {
delay(1000);
lcd.setCursor(0,0);
lcd.print("Humidity is Low");
lcd.setCursor(0,2);
lcd.println("Please Water Me!");
delay(5000);
}
//Print out the readings to the serial monitor for debugging
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.print(" Temperature ");
Serial.print(tempCel );
Serial.print( " C ");
Serial.print(tempFar);
Serial.println(" F ");
}