Summary of Rural Hack Kit
The Rural Hack Kit is an electronic set designed for monitoring and automating farms, gardens, or balcony plants. It enables users to track environmental conditions like soil moisture, light levels, temperature, and humidity using specific sensors. The kit also includes a relay module to control actuators such as water valves, fans, or lamps, facilitating remote garden management through future cloud connectivity tutorials.
Parts used in the Rural Hack Kit:
- DHT22 Humidity Sensor
- Log-scale Analog Light Sensor (Ga1a12s202)
- Soil Moisture Sensor from Miceuz
- Grove Relay Module from Seeed
- Resistors, pushbuttons, and connectors
The Rural Hack Kit is the perfect electronic set to get started hacking farms, gardens, or even plants on your balcony.
Story
The Rural Hack kit.
The Rural Hack Kit is the perfect electronic set to get you started hacking your farm, garden, or plants on your balcony.

The kit includes the essentials for monitoring the environment of our green silent friends: an accurate soil moisture sensor, a precise digital light sensor module, and a temperature and humidity sensor.
Moreover, to automate your greenhouse, the kit features a relay module that you can use to control a water valve, a fan, or a lamp.
KIT CONTENTS
- Humidity Sensor (DHT22)
- Log-scale Analog Light Sensor (Ga1a12s202 in its Adafruit’s Flavour)
- Soil Moisture Sensor (aka the slim chirp) from Miceuz
- Grove Relay Module from Seeed
- Resistors / pushbuttons / connectors
This is the first of a series of tutorial that will teach how to use the modules in the kit. In this tutorial we are going to learn how to connect the sensors and actuators to the Arduino, read their data, and interact with them.
In the next tutorials you will learn how to connect the sensor to cloud services and take care of your garden remotely.
DHT22 humidity and temperature sensor
Sensor Specs
The DHT22 is a digital sensor capable of reading environmental temperature and humidity.
- Low cost
- 3 to 5V power and I/O
- 2.5mA max current use during conversion (while requesting data)
- Good for 0-100% humidity readings with 2-5% accuracy
- Good for -40 to 80°C temperature readings ±0.5°C accuracy
- No more than 0.5 Hz sampling rate (once every 2 seconds)
- Body size 27mm x 59mm x 13.5mm (1.05″ x 2.32″ x 0.53″)
- 4 pins, 0.1″ spacing
- Weight (just the DHT22): 2.4g
Connections
Connecting to to the sensor is very easy. As shown in the picture connect
- the first pin to VCC on your board.
- The second pin is the data Out pin, connect that to any digital pin on the board.
- leave the third pin disconnected.
- connect the forth pin to ground.
Setup & test
Before you can try the sensor you need to install its library. Search for dht on the library manager and install the library.
Now you can just upload the test sketch that will get the data from the sensor and print them to the serial port.
#include <SimpleDHT.h>
// for DHT22,
// VCC: 5V or 3V
// GND: GND
// DATA: 6
int pinDHT22 = 6;
SimpleDHT22 dht22;
void setup() {
Serial.begin(115200);
}
void loop() {
// start working...
Serial.println("=================================");
Serial.println("Sample DHT22...");
// read without samples.
// @remark We use read2 to get a float data, such as 10.1*C
// if user doesn't care about the accurate data, use read to get a byte data, such as 10*C.
float temperature = 0;
float humidity = 0;
int err = SimpleDHTErrSuccess;
if ((err = dht22.read2(pinDHT22, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print("Read DHT22 failed, err="); Serial.println(err);delay(2000);
return;
}
Serial.print("Sample OK: ");
Serial.print((float)temperature); Serial.print(" *C, ");
Serial.print((float)humidity); Serial.println(" RH%");
// DHT22 sampling rate is 0.5HZ.
delay(2500);
}
You can now open the serial monitor and you should be able to see the temperature and humidity value printed there.

I2C Soil moisture sensor
The soil moisture sensor provided with the kit is probably one of the most reliable and at the same time cheap sensor for DIY soil moisture measurement on the market.
Classic soil moisture sensor, (the one that look like a fork with two electrodes) measure resistance between the two electrodes planted in the soil; High resistance between the electrodes means that the soil is not conducting electricity therefore it is probably dry; low resistance means that the electricity is flowing easily between the two electrodes, that’s what happens when the sensor is in water or in a wet soil.
Read more: Rural Hack Kit
- What is the primary purpose of the Rural Hack Kit?
The kit is an electronic set designed to help users start hacking their farm, garden, or plants on a balcony by monitoring the environment. - How does the classic soil moisture sensor measure dryness?
It measures resistance between two electrodes; high resistance indicates dry soil while low resistance indicates wet soil. - Can the DHT22 sensor read both temperature and humidity?
Yes, the DHT22 is a digital sensor capable of reading environmental temperature and humidity simultaneously. - What components are included in the kit contents?
The kit includes a DHT22 sensor, a log-scale analog light sensor, a soil moisture sensor, a Grove Relay Module, and various resistors, pushbuttons, and connectors. - Does the DHT22 sensor require a specific library to function?
Yes, users must install the SimpleDHT library via the library manager before uploading the test sketch. - How many pins does the DHT22 sensor have and how are they connected?
It has 4 pins with 0.1 inch spacing; pin one connects to VCC, pin two to a digital data pin, pin three is left disconnected, and pin four connects to ground. - What is the maximum current usage for the DHT22 during conversion?
The sensor uses a maximum of 2.5mA during conversion when requesting data. - What actuator can be controlled using the relay module in the kit?
The relay module can be used to control a water valve, a fan, or a lamp to automate a greenhouse. - What accuracy does the DHT22 offer for humidity readings?
The sensor provides good readings for 0-100% humidity with an accuracy of 2-5%. - Is it possible to connect these sensors to cloud services later?
Yes, upcoming tutorials in this series will teach how to connect the sensors to cloud services for remote garden care.
