Things used in this project

Schematics

Green Garden Schematics

Code

Green GardenArduino
/*  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

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

The composting friend
Intermediate
  • 734
  • 34

Full instructions

Our goal is to make composting easier to use and to maintain.

AquaNiner Pet Hydration Monitor
Intermediate
  • 477
  • 14

Full instructions

Using two Photons, IFTTT and ThingSpeak, get notifications for when your furry friend needs water and monitor how much they're drinking.

Temperature Mirror
Intermediate
  • 462
  • 8

Full instructions

The Temperature Mirror incorporates a digital display to allow its user to readily view time, temperature, humidity, and light.

Temperature Mirror

MEGR3171 Team 49

Pet Feeder
Intermediate
  • 489
  • 8

Full instructions

Automated pet food dispenser to feed our pets when we are not at home by using an IoT device.

LightAlert
Intermediate
  • 171
  • 4

Full instructions

As the great Terry Crews once said "that's 49 cents of milk spilt over the table! Somebody's gonna drink that!" But instead... electricity.

Automated Room Light
Intermediate
  • 200
  • 5

Full instructions

Automated light that allows you control your room light with a motion sensor and Amazon Alexa while logging the light level every minute.

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback