Green Garden

Green Garden is the self-automation system for plants.

IntermediateWork in progress1,267
Green Garden

Things used in this project

Story

Read more

Schematics

Green Garden Schematics

Code

Green Garden

Arduino
/*  Project - greengarden
    Team - Amazing
    Hackster AWS Intel hackathon, NYC
    December 11, 2016
*/

#include <TH02_dev.h>
#include "Arduino.h"
#include "Wire.h"

#define  LightSensor A0
#define  MoistureSensor A1

void setup() {
  Serial.begin(9600);        // start serial for output

  Serial.println("TH02 initializing ...");
  /* Power up,delay 150ms,until voltage is stable */
  delay(150);
  /* Reset TH02 */
  TH02.begin();
  delay(100);
  /* Determine TH02_dev is available or not */
  Serial.println("TH02 is available");

}

void loop()
{
  float temper = TH02.ReadTemperature();
  Serial.print("Temperature: ");
  Serial.print(temper);
  Serial.print("C");
  Serial.println("\t");

  float humidity = TH02.ReadHumidity();
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print("%");
  Serial.println("\t");

  // read the input on analog pin 0:
  int sensorValue1 = analogRead(LightSensor);
  // print out the value you read:
  Serial.print("Light Level: ");
  Serial.print(sensorValue1);
  Serial.print("\t");
  Serial.println();

  // read the input on analog pin 1:
  int sensorValue2 = analogRead(MoistureSensor);
  // print out the value you read:
  Serial.print("Moisture Level: ");
  Serial.print(sensorValue2);
  Serial.println("\t");
  Serial.println();

  // delay in between reads for stability
  delay(1000);

}

Credits

Aryuna Dashidorzhina

Aryuna Dashidorzhina

2 projects • 3 followers
Contact
Rumana Hassin Syed

Rumana Hassin Syed

2 projects • 6 followers
Contact
Joselin Campoverde

Joselin Campoverde

2 projects • 2 followers
Contact
Farrukh Zia

Farrukh Zia

2 projects • 2 followers
Professor of computer technology at CityTech
Contact
Mellissa valle

Mellissa valle

2 projects • 2 followers
Contact
Farjana Ferdousy

Farjana Ferdousy

3 projects • 6 followers
Masters degree in Digital Forensics & Cybersecurity Student (CUNY John Jay) and Adjunct Lecturer (CET Department, CUNY NYCCT)
Contact

Comments