Automated Garden

details

Automated Garden

2017-02-03_garden

This project is an example of Ethernet shield.
User can manage his garden easily by using Arduino platform through Web.
This project would be included in IoT category of WIZnet Museum.

Hardware components:

-. Arduino UNO & Genuino UNO

-. Arduino Ethernet Shield2

-. Raspberry Pi

-. Sensors

Software apps and online services:

-. Arduino IDE

-. Raspberry Pi Raspbian

-. Cayenne

 

 

Story

 

 

Code

#include "DHT.h"//#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include </p><p>#define DHTPIN 8     // what digital pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321</p><p>#define VIRT_TEMP V1
#define VIRT_HUM V2</p><p>// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "your toker";</p><p>DHT dht(DHTPIN, DHTTYPE);
unsigned long prev_DHT_refresh, interval_DHT_refresh = 1000;</p><p>void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token);</p><p>  dht.begin();
}void loop()
{
  Cayenne.run();</p><p>  getDhtValues();</p><p>}</p><p>void getDhtValues() {
    unsigned long now = millis();
  
  if (now - prev_DHT_refresh > interval_DHT_refresh) {
    // Reading temperature or humidity takes about 250 milliseconds!
    // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
    float h = dht.readHumidity();
    // Read temperature as Celsius (the default)
    float t = dht.readTemperature();   // Check if any reads failed
    if (!isnan(h) && !isnan(t)) {
      Cayenne.virtualWrite(VIRT_HUM, h);
      Cayenne.celsiusWrite(VIRT_TEMP, t);
    }
    prev_DHT_refresh = now;
  }
}

 

Setup the Raspberry Pi

Let’s do a time lapse of the plant growing.

3 Software:

  • Putty to connect in remote to the Raspberry WIn32 disk imager:

After downloading, install it. Open it:

1. You will see “device”. In general, the default is good (if you only have the SD card connected)

2. Click on the blue icon folder and select the Raspbian Jessie image you have downloaded

3. Click write and it’s done. You can now insert the card to the Raspberry.

Putty: It allows us to connect via SSH, open Putty (no need to install).

  • Connect internet cable to the Raspberry
  • You need to find the IP of the Raspberry 2 the easy way:
  • Connect to your box interface you will be able to see the device with the IP
  • Connect the touchscreen and keyboard go to terminal then ifconfig.Now in Putty enter the IP address. It will be something like 192.168.0.3 then enter.
  • It will ask to trust, click yes

 

If you want to know more in detail, refer to

Source: https://www.hackster.io/thomas_sxt/automated-garden-77bee8?utm_source=Hackster.io+newsletter&utm_campaign=775f0495a5-2015_4_17_Top_projects4_16_2015&utm_medium=email&utm_term=0_6ff81e3e5b-775f0495a5-140538701&mc_cid=775f0495a5&mc_eid=b7d75c52a6взять микрозайм на карту

 

Collected by Jim: jim@wiznet.io

Automated Garden

2017-02-03_garden

This project is an example of Ethernet shield.
User can manage his garden easily by using Arduino platform through Web.
This project would be included in IoT category of WIZnet Museum.

Hardware components:

-. Arduino UNO & Genuino UNO

-. Arduino Ethernet Shield2

-. Raspberry Pi

-. Sensors

Software apps and online services:

-. Arduino IDE

-. Raspberry Pi Raspbian

-. Cayenne

 

 

Story

 

 

Code

#include "DHT.h"//#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include </p><p>#define DHTPIN 8     // what digital pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321</p><p>#define VIRT_TEMP V1
#define VIRT_HUM V2</p><p>// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "your toker";</p><p>DHT dht(DHTPIN, DHTTYPE);
unsigned long prev_DHT_refresh, interval_DHT_refresh = 1000;</p><p>void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token);</p><p>  dht.begin();
}void loop()
{
  Cayenne.run();</p><p>  getDhtValues();</p><p>}</p><p>void getDhtValues() {
    unsigned long now = millis();
  
  if (now - prev_DHT_refresh > interval_DHT_refresh) {
    // Reading temperature or humidity takes about 250 milliseconds!
    // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
    float h = dht.readHumidity();
    // Read temperature as Celsius (the default)
    float t = dht.readTemperature();   // Check if any reads failed
    if (!isnan(h) && !isnan(t)) {
      Cayenne.virtualWrite(VIRT_HUM, h);
      Cayenne.celsiusWrite(VIRT_TEMP, t);
    }
    prev_DHT_refresh = now;
  }
}

 

Setup the Raspberry Pi

Let’s do a time lapse of the plant growing.

3 Software:

  • Putty to connect in remote to the Raspberry WIn32 disk imager:

After downloading, install it. Open it:

1. You will see “device”. In general, the default is good (if you only have the SD card connected)

2. Click on the blue icon folder and select the Raspbian Jessie image you have downloaded

3. Click write and it’s done. You can now insert the card to the Raspberry.

Putty: It allows us to connect via SSH, open Putty (no need to install).

  • Connect internet cable to the Raspberry
  • You need to find the IP of the Raspberry 2 the easy way:
  • Connect to your box interface you will be able to see the device with the IP
  • Connect the touchscreen and keyboard go to terminal then ifconfig.Now in Putty enter the IP address. It will be something like 192.168.0.3 then enter.
  • It will ask to trust, click yes

 

If you want to know more in detail, refer to

Source: https://www.hackster.io/thomas_sxt/automated-garden-77bee8?utm_source=Hackster.io+newsletter&utm_campaign=775f0495a5-2015_4_17_Top_projects4_16_2015&utm_medium=email&utm_term=0_6ff81e3e5b-775f0495a5-140538701&mc_cid=775f0495a5&mc_eid=b7d75c52a6взять микрозайм на карту

 

Collected by Jim: jim@wiznet.io

COMMENTS

Please Login to comment
  Subscribe  
Notify of